Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master-2.0' into images-refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathis Marcotte committed Mar 26, 2024
2 parents 27ccb9e + f13e06c commit 9afa08d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
10 changes: 4 additions & 6 deletions dockerfiles/jupyterlab/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -363,12 +363,10 @@ COPY .Rprofile /tmp/.Rprofile
# Copy over Instructions to Home directory
ADD connect-to-filer.md /home/$NB_USER/connect-to-filer.md

# Point mamba to Artifactory repository
RUN mamba config --add channels https://artifactory.cloud.statcan.ca/artifactory/api/conda/conda-forge-remote --system && \
mamba config --remove channels conda-forge --system && \
mamba config --add channels https://artifactory.cloud.statcan.ca/artifactory/conda-nvidia-remote --system && \
mamba config --add channels https://artifactory.cloud.statcan.ca/artifactory/api/conda/conda-pytorch-remote --system

# Point conda to Artifactory repository
RUN mamba config --add channels https://artifactory.cloud.statcan.ca/artifactory/rpug-conda/ --system && \
mamba config --remove channels conda-forge --system

USER $NB_USER
ENTRYPOINT ["tini", "--"]
CMD ["start-custom.sh"]
6 changes: 2 additions & 4 deletions dockerfiles/jupyterlab/start-custom.sh
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,7 @@ fi
# Retrieve service account details
serviceaccountname=`kubectl get secret artifactory-creds -n $NB_NAMESPACE --template={{.data.Username}} | base64 --decode`
serviceaccounttoken=`kubectl get secret artifactory-creds -n $NB_NAMESPACE --template={{.data.Token}} | base64 --decode`
conda config --add channels https://$serviceaccountname:$serviceaccounttoken@artifactory.cloud.statcan.ca/artifactory/conda-forge-remote/
conda config --add channels https://$serviceaccountname:$serviceaccounttoken@artifactory.cloud.statcan.ca/artifactory/conda-nvidia-remote/
conda config --add channels https://$serviceaccountname:$serviceaccounttoken@artifactory.cloud.statcan.ca/artifactory/conda-pytorch-remote/
conda config --add channels https://$serviceaccountname:$serviceaccounttoken@artifactory.cloud.statcan.ca/artifactory/https://artifactory.cloud.statcan.ca/artifactory/rpug-conda/

pip config set global.index-url https://$serviceaccountname:$serviceaccounttoken@artifactory.cloud.statcan.ca/artifactory/pypi-remote/

Expand All @@ -152,7 +150,7 @@ if [ ! -d "/opt/conda/lib/R/etc/Rprofile.site" ]; then
cat > /opt/conda/lib/R/etc/Rprofile.site<< EOF
options(jupyter.plot_mimetypes = c('text/plain', 'image/png', 'image/jpeg', 'image/svg+xml', 'application/pdf'))
local({
r <- list("cran-remote" = "https://$serviceaccountname:$serviceaccounttoken@artifactory.cloud.statcan.ca/artifactory/cran-remote/")
r <- list("cran-remote" = "https://$serviceaccountname:$serviceaccounttoken@artifactory.cloud.statcan.ca/artifactory/rpug-cran/")
options(repos = r)
})
EOF
Expand Down

0 comments on commit 9afa08d

Please sign in to comment.