Skip to content
Snippets Groups Projects
Commit 559a140d authored by Emmanuel Bruno's avatar Emmanuel Bruno
Browse files

initial release.

parents
No related branches found
No related tags found
No related merge requests found
FROM jupyter/scipy-notebook:584f43f06586
USER root
RUN apt-get update && apt-get install -y \
less \
texlive \
texlive-lang-french \
texlive-latex-extra \
vim \
unzip \
zip \
&& rm -rf /var/lib/apt/lists/*
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 \
jupyter-book==0.10.2 \
jupyter-server-proxy==3.0.2 \
nbgitpuller==0.9.0 \
jupyterlab-git==0.30.1 \
jupyterlab-system-monitor==0.8.0 && \
conda install defaults::nb_conda_kernels && \
npm cache clean --force && \
jupyter lab clean && \
fix-permissions $CONDA_DIR && \
fix-permissions /home/$NB_USER
RUN echo -e "\e[93m***** Install Jupyter LaTeX ****\e[38;5;241m" && \
# RUN jupyter labextension install @jupyterlab/latex doesn't work with lab 3.0
# SO we test a fork. TODO: Multistage Build
RUN git clone https://github.com/joequant/jupyterlab-latex.git && \
cd jupyterlab-latex && \
pip3 install -e . && \
jlpm install && \
jlpm run build && \
jupyter labextension install .
# 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 && \
mkdir -p $CODESERVEREXT_DIR && \
PATH=/opt/bin:$PATH code-server \
--user-data-dir $CODESERVERDATA_DIR\
--extensions-dir $CODESERVEREXT_DIR \
--install-extension vscjava.vscode-java-pack \
--install-extension redhat.vscode-xml \
--install-extension vscode-icons-team.vscode-icons \
--install-extension SonarSource.sonarlint-vscode \
--install-extension GabrielBB.vscode-lombok \
--install-extension jebbs.plantuml && \
groupadd codeserver && \
chgrp -R codeserver $CODESERVEREXT_DIR &&\
chmod 770 -R $CODESERVEREXT_DIR && \
adduser "$NB_USER" codeserver && \
fix-permissions /home/$NB_USER
COPY code-server/codeserver-jupyter_notebook_config.py /tmp/
COPY code-server/icons $HOME/.jupyter/icons
RUN cat /tmp/codeserver-jupyter_notebook_config.py >> $HOME/.jupyter/jupyter_notebook_config.py
USER $NB_USER
build.sh 0 → 100755
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
. ${DIR}/env.sh
docker build \
--file Dockerfile \
-t ${BASE}:$SHA \
-t ${BASE}:$BRANCH \
`[[ "$BRANCH" == "master" ]] && -t ${BASE}:latest` \
.
#!/bin/bash
source /opt/conda/bin/activate base
env.sh 0 → 100755
#!/bin/bash
REGISTRY=brunoe
IMAGE_NAME=jupyterjava
CURRENT=`pwd`
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd $DIR
BASE=${REGISTRY}/${IMAGE_NAME}
BRANCH=`git rev-parse --abbrev-ref HEAD|tr '/' '_' `
SHA=`git log -1 --pretty=%h`
cd $CURRENT
push.sh 0 → 100755
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
echo $DIR
. ${DIR}/env.sh
BASE=${REGISTRY}/${IMAGE_NAME}
BRANCH=`git rev-parse --abbrev-ref HEAD`
echo Branche:$BRANCH
docker push ${BASE} --all-tags
#docker push ${BASE}:`git log -1 --pretty=%h`
#docker push ${BASE}:`git rev-parse --abbrev-ref HEAD`
#[[ "$BRANCH" == "master" ]] && docker push -t "${BASE}:latest"
run.sh 0 → 100755
#!/usr/bin/env bash
docker run --rm \
--name jupyterjava_${PWD##*/} \
--volume $PWD/notebooks:/home/jovyan/work \
--publish 8888:8888 \
--env NB_UID=$UID \
--env JUPYTER_ENABLE_LAB=yes \
brunoe/jupyterjava:feature_dockerstack
# --env NOTEBOOK_SRC_SUBDIR=${PWD##*/} \
# --volume $PWD/src:/src \
# --volume ~/.m2:/home/jovyan/.m2 \
# --volume $PWD/codeserver:/codeserver \
#--env CHOWN_HOME_OPTS='-R' --env CHOWN_HOME=yes \
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment