Commit 7a0c7325 authored by Peter Parente's avatar Peter Parente Committed by GitHub

Merge pull request #959 from jjangsangy/master

Configure Python Version with Build Arg
parents ad3574d3 8bce6dc3
...@@ -63,6 +63,7 @@ RUN echo "auth requisite pam_deny.so" >> /etc/pam.d/su && \ ...@@ -63,6 +63,7 @@ RUN echo "auth requisite pam_deny.so" >> /etc/pam.d/su && \
USER $NB_UID USER $NB_UID
WORKDIR $HOME WORKDIR $HOME
ARG PYTHON_VERSION=default
# Setup work directory for backward-compatibility # Setup work directory for backward-compatibility
RUN mkdir /home/$NB_USER/work && \ RUN mkdir /home/$NB_USER/work && \
...@@ -82,9 +83,10 @@ RUN cd /tmp && \ ...@@ -82,9 +83,10 @@ RUN cd /tmp && \
$CONDA_DIR/bin/conda config --system --prepend channels conda-forge && \ $CONDA_DIR/bin/conda config --system --prepend channels conda-forge && \
$CONDA_DIR/bin/conda config --system --set auto_update_conda false && \ $CONDA_DIR/bin/conda config --system --set auto_update_conda false && \
$CONDA_DIR/bin/conda config --system --set show_channel_urls true && \ $CONDA_DIR/bin/conda config --system --set show_channel_urls true && \
if [ ! $PYTHON_VERSION = 'default' ]; then conda install --yes python=$PYTHON_VERSION; fi && \
conda list python | grep '^python ' | tr -s ' ' | cut -d '.' -f 1,2 | sed 's/$/.*/' >> $CONDA_DIR/conda-meta/pinned && \
$CONDA_DIR/bin/conda install --quiet --yes conda && \ $CONDA_DIR/bin/conda install --quiet --yes conda && \
$CONDA_DIR/bin/conda update --all --quiet --yes && \ $CONDA_DIR/bin/conda update --all --quiet --yes && \
conda list python | grep '^python ' | tr -s ' ' | cut -d '.' -f 1,2 | sed 's/$/.*/' >> $CONDA_DIR/conda-meta/pinned && \
conda clean --all -f -y && \ conda clean --all -f -y && \
rm -rf /home/$NB_USER/.cache/yarn && \ rm -rf /home/$NB_USER/.cache/yarn && \
fix-permissions $CONDA_DIR && \ fix-permissions $CONDA_DIR && \
......
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