Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jupyter-base
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Emmanuel Bruno
jupyter-base
Commits
6eec4d5f
Commit
6eec4d5f
authored
2 years ago
by
Emmanuel Bruno
Browse files
Options
Downloads
Patches
Plain Diff
fixes user access rights.
parent
e03b9034
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
Dockerfile
+35
-19
35 additions, 19 deletions
Dockerfile
build.sh
+3
-2
3 additions, 2 deletions
build.sh
create_work_subdirs.sh
+5
-3
5 additions, 3 deletions
create_work_subdirs.sh
with
43 additions
and
24 deletions
Dockerfile
+
35
−
19
View file @
6eec4d5f
FROM
jupyter/scipy-notebook:2021-10-20
#FROM jupyter/scipy-notebook:2022-10-24
FROM
jupyter/scipy-notebook:lab-3.5.0
USER
root
USER
root
RUN
apt-get update
--yes
&&
apt-get
install
--yes
--no-install-recommends
\
ENV
PIP_CACHE_DIR=/var/cache/buildkit/pip
RUN
--mount
=
type
=
cache,target
=
/var/cache/apt
\
rm
-f
/etc/apt/apt.conf.d/docker-clean
&&
\
mkdir
-p
$PIP_CACHE_DIR
&&
\
apt-get update
--yes
&&
apt-get
install
--yes
-qq
--no-install-recommends
\
bash
\
bash
\
curl
\
curl
\
less
\
less
\
vim
\
vim
\
zip
&&
\
zip
&&
\
apt-get clean
&&
rm
-rf
/var/lib/apt/lists/
*
&&
rm
-rf
/var/cache/apt
rm
-rf
/var/lib/apt/lists/
*
# Sets Defaults directories
ENV
WORK_DIR $HOME/work
ENV
NOTEBOOKS_DIR $WORK_DIR/notebooks
ENV
SAMPLES_DIR $WORK_DIR/samples
# Sets codeserver directories
# Sets codeserver directories
ENV
CODESERVEREXT_DIR /opt/codeserver/extensions
ENV
CODESERVEREXT_DIR /opt/codeserver/extensions
ENV
CODE_WORKINGDIR $HOME/work
ENV
CODE_WORKINGDIR $HOME/work
ENV
CODESERVERDATA_DIR $HOME/work/codeserver/data
ENV
CODESERVERDATA_DIR $HOME/work/.codeserver/data
ENV
PATH=/opt/bin:$PATH
ENV
PATH=/opt/bin:$PATH
# Enable persistant conda env
# Enable persistant conda env
COPY
condarc /home/jovyan/.condarc
COPY
condarc /home/jovyan/.condarc
# Instalk JupyterLab
# Install JupyterLab
RUN
echo
-e
"
\e
[93m***** Install Jupyter Lab Extensions ****
\e
[38;5;241m"
&&
\
RUN
--mount
=
type
=
cache,target
=
/var/cache/buildkit/pip
\
--mount
=
type
=
cache,target
=
/opt/conda/pkgs
\
echo
-e
"
\e
[93m***** Install Jupyter Lab Extensions ****
\e
[38;5;241m"
&&
\
pip
install
--quiet
--no-cache-dir
--upgrade
\
pip
install
--quiet
--no-cache-dir
--upgrade
\
jupyter-book
\
jupyter-book
\
jupyter-server-proxy
\
jupyter-server-proxy
\
...
@@ -29,7 +43,8 @@ RUN echo -e "\e[93m***** Install Jupyter Lab Extensions ****\e[38;5;241m" && \
...
@@ -29,7 +43,8 @@ RUN echo -e "\e[93m***** Install Jupyter Lab Extensions ****\e[38;5;241m" && \
jupyterlab-git
\
jupyterlab-git
\
jupyterlab-system-monitor
\
jupyterlab-system-monitor
\
jinja-yaml-magic
\
jinja-yaml-magic
\
ipympl
&&
\
# ipympl
\
&&
\
jupyter labextension
install
@jupyter-widgets/jupyterlab-manager
&&
\
jupyter labextension
install
@jupyter-widgets/jupyterlab-manager
&&
\
# pip install jupyterlab_templates &&
\
# pip install jupyterlab_templates &&
\
# jupyter labextension install jupyterlab_templates &&
\
# jupyter labextension install jupyterlab_templates &&
\
...
@@ -42,6 +57,7 @@ RUN echo -e "\e[93m***** Install Jupyter Lab Extensions ****\e[38;5;241m" && \
...
@@ -42,6 +57,7 @@ RUN echo -e "\e[93m***** Install Jupyter Lab Extensions ****\e[38;5;241m" && \
tectonic texlab chktex
&&
\
tectonic texlab chktex
&&
\
echo
-e
"
\e
[93m**** Installs Code Server Web ****
\e
[38;5;241m"
&&
\
echo
-e
"
\e
[93m**** Installs Code Server Web ****
\e
[38;5;241m"
&&
\
curl
-fsSL
https://code-server.dev/install.sh | sh
-s
--
--prefix
=
/opt
--method
=
standalone
&&
\
curl
-fsSL
https://code-server.dev/install.sh | sh
-s
--
--prefix
=
/opt
--method
=
standalone
&&
\
mkdir
-p
$CODESERVERDATA_DIR
&&
\
mkdir
-p
$CODESERVEREXT_DIR
&&
\
mkdir
-p
$CODESERVEREXT_DIR
&&
\
PATH
=
/opt/bin:
$PATH
code-server
\
PATH
=
/opt/bin:
$PATH
code-server
\
--user-data-dir
$CODESERVERDATA_DIR
\
--user-data-dir
$CODESERVERDATA_DIR
\
...
@@ -58,9 +74,9 @@ RUN echo -e "\e[93m***** Install Jupyter Lab Extensions ****\e[38;5;241m" && \
...
@@ -58,9 +74,9 @@ RUN echo -e "\e[93m***** Install Jupyter Lab Extensions ****\e[38;5;241m" && \
chmod
770
-R
$CODESERVEREXT_DIR
&&
\
chmod
770
-R
$CODESERVEREXT_DIR
&&
\
adduser
"
$NB_USER
"
codeserver
&&
\
adduser
"
$NB_USER
"
codeserver
&&
\
echo
-e
"
\e
[93m**** Clean up ****
\e
[38;5;241m"
&&
\
echo
-e
"
\e
[93m**** Clean up ****
\e
[38;5;241m"
&&
\
npm cache clean
--force
&&
\
#
npm cache clean --force &&
\
mamba clean
--all
-f
-y
&&
\
#
mamba clean --all -f -y &&
\
jupyter lab clean
&&
\
#
jupyter lab clean &&
\
rm
-rf
"/home/
${
NB_USER
}
/.cache/yarn"
&&
\
rm
-rf
"/home/
${
NB_USER
}
/.cache/yarn"
&&
\
fix-permissions
"
$CONDA_DIR
"
&&
\
fix-permissions
"
$CONDA_DIR
"
&&
\
fix-permissions
"/home/
$NB_USER
"
fix-permissions
"/home/
$NB_USER
"
...
...
This diff is collapsed.
Click to expand it.
build.sh
+
3
−
2
View file @
6eec4d5f
...
@@ -3,9 +3,10 @@
...
@@ -3,9 +3,10 @@
DIR
=
"
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
"
>
/dev/null 2>&1
&&
pwd
)
"
DIR
=
"
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
"
>
/dev/null 2>&1
&&
pwd
)
"
.
${
DIR
}
/env.sh
.
${
DIR
}
/env.sh
docker build
\
#DOCKER_BUILDKIT=1 docker build \
docker buildx build
\
--file
Dockerfile
\
--file
Dockerfile
\
-t
${
BASE
}
:
$SHA
\
-t
${
BASE
}
:
$SHA
\
`
[[
"
$BRANCH
"
!=
"master"
]]
&&
echo
-t
${
BASE
}
:
$BRANCH
`
\
`
[[
"
$BRANCH
"
!=
"master"
]]
&&
echo
-t
${
BASE
}
:
$BRANCH
`
\
`
[[
"
$BRANCH
"
==
"master"
]]
&&
echo
-t
${
BASE
}
:latest
`
\
`
[[
"
$BRANCH
"
==
"master"
]]
&&
echo
-t
${
BASE
}
:latest
`
$@
\
.
.
This diff is collapsed.
Click to expand it.
create_work_subdirs.sh
+
5
−
3
View file @
6eec4d5f
...
@@ -5,7 +5,8 @@ for subdir in $NEEDED_WORK_DIRS; do
...
@@ -5,7 +5,8 @@ for subdir in $NEEDED_WORK_DIRS; do
if
[
!
-f
$dir
]
;
then
if
[
!
-f
$dir
]
;
then
echo
Creating
$dir
echo
Creating
$dir
mkdir
-p
$dir
mkdir
-p
$dir
chmod
700
$dir
fix-permissions
$dir
# chmod 700 $dir
fi
fi
done
done
...
@@ -15,6 +16,7 @@ for subfile in $NEEDED_WORK_FILES; do
...
@@ -15,6 +16,7 @@ for subfile in $NEEDED_WORK_FILES; do
if
[
!
-f
$file
]
;
then
if
[
!
-f
$file
]
;
then
echo
Creating
$file
echo
Creating
$file
touch
$file
touch
$file
chmod
700
$dir
fix-permissions
$file
# chmod 700 $dir
fi
fi
done
done
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