Skip to content

Commit

Permalink
fix jupyter-restricted-download to pass config to downstream images
Browse files Browse the repository at this point in the history
  • Loading branch information
paulineribeyre committed Feb 7, 2024
1 parent 24b235b commit 82bcd9a
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions jupyter-restricted-download/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,10 @@ RUN jupyter labextension disable @jupyterlab/docmanager-extension:download \
&& jupyter labextension disable @jupyterlab/filebrowser-extension:download

RUN pip install pandas numpy seaborn scipy matplotlib pyNetLogo SALib boto3 awscli --upgrade

# RUN pip install PyYAML==5.3.1 --upgrade
RUN pip install gen3==4.18.0 --upgrade

RUN pip install jupyter --upgrade

RUN pip uninstall nbconvert --yes

# Create a non-root user for Jupyter without copying /bin or /bin/bash
ARG NB_USER=jovyan
ARG NB_UID=1000
Expand All @@ -69,13 +66,20 @@ RUN useradd -m -s /bin/bash -N -u $NB_UID $NB_USER && \
chmod -R u+rwx /home/$NB_USER && \
mkdir -p /home/$NB_USER/pd

# Configure environment
ENV CONDA_DIR=/opt/conda \
PATH=/usr/local/bin:$PATH \
SHELL=/bin/bash \
NB_USER=jovyan \
NB_UID=1000 \
HOME=/home/$NB_USER \
LC_ALL=en_US.UTF-8 \
LANG=en_US.UTF-8 \
LANGUAGE=en_US.UTF-8

# Expose port 8888 for JupyterLab
EXPOSE 8888

ARG COVID_TOOLS_BRANCH=master
ADD --chown=$NB_USER:users https://raw.githubusercontent.com/uc-cdis/covid19-tools/$COVID_TOOLS_BRANCH/covid19-notebooks/welcome.html /home/$NB_USER/
RUN touch /home/$NB_USER/welcome.html

# Add local files as late as possible to avoid cache busting
COPY start.sh /usr/local/bin/
COPY start-notebook.sh /usr/local/bin/
Expand Down

0 comments on commit 82bcd9a

Please sign in to comment.