File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
build/COPY_ROOT/opt/ai-dock/bin/build/layer0 Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ export MAMBA_INSTALL="micromamba install --always-softlink -y -c pytorch -c cond
15
15
printf " export MAMBA_CREATE=\" %s\" \n" " ${MAMBA_CREATE} " >> /opt/ai-dock/etc/environment.sh
16
16
printf " export MAMBA_INSTALL=\" %s\" \n" " ${MAMBA_INSTALL} " >> /opt/ai-dock/etc/environment.sh
17
17
18
+ python_version=" $( micromamba -n $MAMBA_DEFAULT_ENV run python -V | tail -n1 | awk ' {print $2}' | cut -d ' .' -f1,2) "
19
+ printf " /opt/micromamba/envs/%s/lib/python%s/site-packages/torch/lib/\n" " $MAMBA_DEFAULT_ENV " " $python_version " >> /etc/ld.so.conf.d/x86_64-linux-gnu.micromamba.80-pytorch.conf
18
20
19
21
$MAMBA_INSTALL -n $MAMBA_DEFAULT_ENV \
20
22
ffmpeg=" $ffmpeg_version " \
Original file line number Diff line number Diff line change 1
1
#! /bin/false
2
2
3
3
export MAMBA_CREATE=" micromamba create --always-softlink -y -c pytorch -c nvidia -c conda-forge"
4
+ env-store MAMBA_CREATE
4
5
export MAMBA_INSTALL=" micromamba install --always-softlink -y -c pytorch -c nvidia -c conda-forge"
5
- printf " export MAMBA_CREATE=\" %s\" \n" " ${MAMBA_CREATE} " >> /opt/ai-dock/etc/environment.sh
6
- printf " export MAMBA_INSTALL=\" %s\" \n" " ${MAMBA_INSTALL} " >> /opt/ai-dock/etc/environment.sh
7
-
8
- cuda_short_version=$( cut -d ' .' -f 1,2 <<< " ${CUDA_VERSION}" )
6
+ env-store MAMBA_INSTALL
9
7
10
8
# Mamba will downgrade python to satisfy requirements. We don't want that.
11
9
python_lock=" $( micromamba -n $MAMBA_DEFAULT_ENV run python -V | tail -n1 | awk ' {print $2}' | cut -d ' .' -f1,2) "
12
10
13
11
$MAMBA_INSTALL -n $MAMBA_DEFAULT_ENV \
14
12
pytorch=${PYTORCH_VERSION} torchvision torchaudio \
15
13
python=${python_lock} \
16
- pytorch-cuda=${cuda_short_version}
14
+ pytorch-cuda=" $( cut -d ' . ' -f 1,2 <<< " ${CUDA_VERSION} " ) "
You can’t perform that action at this time.
0 commit comments