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
913450ef
Commit
913450ef
authored
May 3, 2021
by
Emmanuel Bruno
Browse files
Options
Downloads
Patches
Plain Diff
adds codeserver and cleans up.
parent
ee39ae37
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Dockerfile
+48
-40
48 additions, 40 deletions
Dockerfile
with
48 additions
and
40 deletions
Dockerfile
+
48
−
40
View file @
913450ef
...
@@ -10,12 +10,28 @@ RUN apt-get update && apt-get install -y \
...
@@ -10,12 +10,28 @@ RUN apt-get update && apt-get install -y \
texlive-latex-extra
\
texlive-latex-extra
\
vim
\
vim
\
unzip
\
unzip
\
zip
\
zip
&&
\
&&
rm
-rf
/var/lib/apt/lists/
*
apt-get clean
&&
rm
-rf
/var/lib/apt/lists/
*
&&
rm
-rf
/var/cache/apt
&&
\
echo
en_US.UTF-8 UTF-8
>>
/etc/locale.gen
&&
\
locale-gen
# Sets locale as default
ENV
LANG=en_US.UTF-8 \
LANGUAGE=en_US:en \
LC_ALL=en_US.UTF-8
# Sets codeserver directories
ENV
CODESERVEREXT_DIR /opt/codeserver/extensions
ENV
CODE_WORKINGDIR $HOME/work/src
ENV
CODESERVERDATA_DIR $HOME/work/codeserver/data
# Add conda env hook
COPY
./conda-activate.sh /usr/local/bin/before-notebook.d/
# RUN jupyter labextension install @jupyterlab/latex doesn't work with lab 3.0
# SO we test a fork. TODO: Multistage Build
RUN
echo
-e
"
\e
[93m***** Install Jupyter Lab Extensions ****
\e
[38;5;241m"
&&
\
RUN
echo
-e
"
\e
[93m***** Install Jupyter Lab Extensions ****
\e
[38;5;241m"
&&
\
# curl -fsSL https://deb.nodesource.com/setup_15.x | bash - &&
\
# apt-get update && apt-get install -y --no-install-recommends nodejs gcc g++ make &&
\
pip
install
--quiet
--no-cache-dir
--upgrade
\
pip
install
--quiet
--no-cache-dir
--upgrade
\
jupyter-book
==
0.10.2
\
jupyter-book
==
0.10.2
\
jupyter-server-proxy
==
3.0.2
\
jupyter-server-proxy
==
3.0.2
\
...
@@ -24,27 +40,14 @@ RUN echo -e "\e[93m***** Install Jupyter Lab Extensions ****\e[38;5;241m" && \
...
@@ -24,27 +40,14 @@ RUN echo -e "\e[93m***** Install Jupyter Lab Extensions ****\e[38;5;241m" && \
jupyterlab-system-monitor
==
0.8.0
&&
\
jupyterlab-system-monitor
==
0.8.0
&&
\
conda
install
defaults::nb_conda_kernels
&&
\
conda
install
defaults::nb_conda_kernels
&&
\
npm cache clean
--force
&&
\
npm cache clean
--force
&&
\
jupyter lab clean
&&
\
echo
-e
"
\e
[93m***** Install Jupyter LaTeX ****
\e
[38;5;241m"
&&
\
fix-permissions
$CONDA_DIR
&&
\
fix-permissions /home/
$NB_USER
# RUN jupyter labextension install @jupyterlab/latex doesn't work with lab 3.0
# SO we test a fork. TODO: Multistage Build
RUN
echo
-e
"
\e
[93m***** Install Jupyter LaTeX ****
\e
[38;5;241m"
&&
\
git clone https://github.com/joequant/jupyterlab-latex.git
&&
\
git clone https://github.com/joequant/jupyterlab-latex.git
&&
\
cd
jupyterlab-latex
&&
\
cd
jupyterlab-latex
&&
\
pip3
install
-e
.
&&
\
pip3
install
-e
.
&&
\
jlpm
install
&&
\
jlpm
install
&&
\
jlpm run build
&&
\
jlpm run build
&&
\
jupyter labextension
install
.
jupyter labextension
install
.
&&
\
echo
-e
"
\e
[93m**** Installs Code Server Web ****
\e
[38;5;241m"
&&
\
# Add conda env hook
COPY
./conda-activate.sh /usr/local/bin/before-notebook.d/
ENV
CODESERVEREXT_DIR /opt/codeserver/extensions
ENV
CODE_WORKINGDIR $HOME/work/src
ENV
CODESERVERDATA_DIR $HOME/work/codeserver/data
RUN
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
$CODESERVEREXT_DIR
&&
\
mkdir
-p
$CODESERVEREXT_DIR
&&
\
PATH
=
/opt/bin:
$PATH
code-server
\
PATH
=
/opt/bin:
$PATH
code-server
\
...
@@ -54,13 +57,18 @@ RUN echo -e "\e[93m**** Installs Code Server Web ****\e[38;5;241m" && \
...
@@ -54,13 +57,18 @@ RUN echo -e "\e[93m**** Installs Code Server Web ****\e[38;5;241m" && \
--install-extension
redhat.vscode-xml
\
--install-extension
redhat.vscode-xml
\
--install-extension
vscode-icons-team.vscode-icons
\
--install-extension
vscode-icons-team.vscode-icons
\
--install-extension
SonarSource.sonarlint-vscode
\
--install-extension
SonarSource.sonarlint-vscode
\
--install-extension
GabrielBB.vscode-lombok
\
# --install-extension GabrielBB.vscode-lombok
\
--install-extension
james-yu.latex-workshop
\
--install-extension
jebbs.plantuml
&&
\
--install-extension
jebbs.plantuml
&&
\
groupadd codeserver
&&
\
groupadd codeserver
&&
\
chgrp
-R
codeserver
$CODESERVEREXT_DIR
&&
\
chgrp
-R
codeserver
$CODESERVEREXT_DIR
&&
\
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"
&&
\
jupyter lab clean
&&
\
fix-permissions
$CONDA_DIR
&&
\
fix-permissions /home/
$NB_USER
fix-permissions /home/
$NB_USER
COPY
code-server/codeserver-jupyter_notebook_config.py /tmp/
COPY
code-server/codeserver-jupyter_notebook_config.py /tmp/
COPY
code-server/icons $HOME/.jupyter/icons
COPY
code-server/icons $HOME/.jupyter/icons
RUN
cat
/tmp/codeserver-jupyter_notebook_config.py
>>
$HOME
/.jupyter/jupyter_notebook_config.py
RUN
cat
/tmp/codeserver-jupyter_notebook_config.py
>>
$HOME
/.jupyter/jupyter_notebook_config.py
...
...
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