Skip to content

Commit c889f17

Browse files
authored
Merge branch 'main' into use_conda_always
2 parents ec1a629 + d9ca067 commit c889f17

3 files changed

Lines changed: 14 additions & 1 deletion

File tree

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ ARG LINUX_VER=notset
8383
ARG PYTHON_VER=notset
8484
ARG DEBIAN_FRONTEND=noninteractive
8585
ENV PATH=/opt/conda/bin:$PATH
86+
# ensure conda's files and configuration can be found at runtime even if environment activation was bypassed
87+
ENV CONDA_PREFIX=/opt/conda
8688
ENV PYTHON_VERSION=${PYTHON_VER}
8789

8890
SHELL ["/bin/bash", "-euo", "pipefail", "-c"]

context/entrypoint.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env bash
1+
#!/usr/bin/env -S bash -l
22
# Copyright (c) 2023-2026, NVIDIA CORPORATION.
33

44
set -eo pipefail
@@ -10,6 +10,9 @@ https://developer.download.nvidia.com/licenses/NVIDIA_Deep_Learning_Container_Li
1010
1111
EOF
1212

13+
# Activate conda (login shell sources from /etc/profile.d/conda.sh)
14+
conda activate
15+
1316
if [ -e "/home/rapids/environment.yml" ]; then
1417
echo "environment.yml found. Installing packages."
1518
timeout ${CONDA_TIMEOUT:-600} conda env update -n base -y -f /home/rapids/environment.yml || exit $?

tests/container-canary/base.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,3 +124,11 @@ checks:
124124
- /bin/bash
125125
- -c
126126
- "[[ $(conda env list --quiet | grep --count -E '^[A-Za-z]+') == 1 ]];"
127+
- name: conda-prefix
128+
description: Conda prefix set to /opt/conda
129+
probe:
130+
exec:
131+
command:
132+
- /bin/bash
133+
- -c
134+
- '[[ "${CONDA_PREFIX}" == "/opt/conda" ]];'

0 commit comments

Comments
 (0)