Commit 7d88c5c2 authored by Thomas Lips's avatar Thomas Lips
Browse files

no conda env to figure out 403 issue on opening notebook

parent bdc24ced
Pipeline #44759 passed with stage
in 9 minutes and 32 seconds
# Choose your desired base image
# select base image: scipy notebook (gpu-enabled)
# name your environment and choose python 3.x version
ARG conda_env=python38
ARG py_ver=3.8
# create conda env with specified python version using mamba
RUN conda create --quiet --yes -p "${CONDA_DIR}/envs/${conda_env}" python=${py_ver} ipython ipykernel && \
conda clean --all -f -y
# alternatively, you can comment out the lines above and uncomment those below
# if you'd prefer to use a YAML file present in the docker build context
# COPY --chown=${NB_UID}:${NB_GID} environment.yml "/home/${NB_USER}/tmp/"
# RUN cd "/home/${NB_USER}/tmp/" && \
# mamba env create -p "${CONDA_DIR}/envs/${conda_env}" -f environment.yml && \
# mamba clean --all -f -y
# create Python 3.x environment and link it to jupyter
RUN "${CONDA_DIR}/envs/${conda_env}/bin/python" -m ipykernel install --user --name="${conda_env}" && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"
# additional pip installs
COPY requirements.txt "/home/${NB_USER}/tmp/"
RUN "${CONDA_DIR}/envs/${conda_env}/bin/pip" install --no-cache-dir -r "/home/${NB_USER}/tmp/requirements.txt" && \
RUN pip install --no-cache-dir -r "/home/${NB_USER}/tmp/requirements.txt" && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"
# prepend conda environment to path
ENV PATH "${CONDA_DIR}/envs/${conda_env}/bin:${PATH}"
# if you want this environment to be the default one, uncomment the following line:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment