-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathminimal.dockerfile
26 lines (19 loc) · 1 KB
/
minimal.dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Choose your desired base image
ARG BASE_CONTAINER=jupyter/minimal-notebook:703d8b2dcb88
FROM $BASE_CONTAINER
# name your environment and choose python 3.x version
ARG conda_env=python37
ARG python_version=3.7
# you can add additional libraries you want conda to install by listing them below the first line and ending with "&& \"
RUN conda create --quiet --yes -p $CONDA_DIR/envs/$conda_env python=$python_version ipython ipykernel && \
conda 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
# any additional pip installs can be added by uncommenting the following line
# RUN $CONDA_DIR/envs/${conda_env}/bin/pip install
# 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:
ENV CONDA_DEFAULT_ENV ${conda_env}