Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Dockerfiles
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Piotr Kalaczynski
Dockerfiles
Commits
73a4923a
Commit
73a4923a
authored
5 years ago
by
Tamas Gal
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of git.km3net.de:common/dockerfiles
parents
e769a5c6
cdb46249
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
desktop/km3book/README.md
+5
-0
5 additions, 0 deletions
desktop/km3book/README.md
desktop/km3book/startup.sh
+25
-2
25 additions, 2 deletions
desktop/km3book/startup.sh
with
30 additions
and
2 deletions
desktop/km3book/README.md
+
5
−
0
View file @
73a4923a
...
...
@@ -14,3 +14,8 @@ needs to download a few GB of data, but consecutive runs will be faster:
To access the JupterLab instance, click on the link shown in the terminal --
and leave that terminal open!
If you want to work with Jpp/aanet/km3pipe in the terminal inside Jupyter,
create a new terminal window, ignore the error message and simply launch
Bash by typing
`bash`
. You will have a fully working terminal session with
all the software activated.
\ No newline at end of file
This diff is collapsed.
Click to expand it.
desktop/km3book/startup.sh
+
25
−
2
View file @
73a4923a
...
...
@@ -4,6 +4,8 @@ NOTEBOOK_DIR=$HOME/notebooks
USER_ID
=
$(
id
-u
)
THE_USER
=
$USER
mkdir
-p
$NOTEBOOK_DIR
cat
<<
EOF
> kernel.json
{
"argv": [
...
...
@@ -34,7 +36,9 @@ cat << EOF > Dockerfile
FROM docker.km3net.de/km3book:1.0.0
RUN useradd -d
$NOTEBOOK_DIR
-u
$(
id
-u
)
-s /bin/bash
$USER
RUN apt-get install -qq -y vim
RUN rm -f /usr/local/share/jupyter/kernels/python3/kernel.json
ADD kernel.json /usr/local/share/jupyter/kernels/python3/kernel.json
RUN chown
$USER
/usr/local/share/jupyter/kernels/python3/kernel.json
USER
$USER
CMD jupyter lab --ip=0.0.0.0 --port=8888 --no-browser --notebook-dir=
$NOTEBOOK_DIR
...
...
@@ -42,6 +46,25 @@ CMD jupyter lab --ip=0.0.0.0 --port=8888 --no-browser --notebook-dir=$NOTEBOOK_D
EXPOSE 22
EOF
sudo
docker build
-t
km3book
:1.0.0
-f
Dockerfile
.
sudo
docker build
-t
my
km3book
-f
Dockerfile
.
chown
-R
$THE_USER
$NOTEBOOK_DIR
sudo
docker run
-p
8000:8888
-p
2200:22
-u
$USER_ID
-v
$NOTEBOOK_DIR
:
$NOTEBOOK_DIR
-it
km3book:1.0.0
cat
<<
EOF
> run.sh
#!/bin/bash
sudo docker run -p 8888:8888 -p 2200:22 -u
$USER_ID
-v
$NOTEBOOK_DIR
:
$NOTEBOOK_DIR
-it mykm3book
EOF
echo
echo
echo
The run script has been generated. From now on, please execute
echo
echo
" ./run.sh"
echo
echo
"to launch the JupyterLab instance. I'll do it for you in 5 seconds!"
echo
echo
sleep
5
chmod
+x run.sh
./run.sh
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment