Skip to content

Commit eff943b

Browse files
committed
some work towards ssl working using certificates but not fully. Fails on non-anconda channels
1 parent 8f2a28a commit eff943b

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

docker/workstation-base/setup/scripts/conda.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ fi
1212
/miniconda/bin/conda init
1313
source ~/.bashrc
1414

15+
# removes anaconda distrubution
16+
conda config --add channels plotly
17+
conda config --add channels conda-forge
18+
conda config --add channels nvidia
19+
conda config --add channels pytorch
20+
conda config --remove channels defaults
21+
1522
gpu=$(which nvidia-smi)
1623
if [[ $gpu == '/usr/bin/nvidia-smi' ]]; then
1724
echo Nvidia GPU found. Installing GPU standard env.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/bash
2+
3+
printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' -
4+
5+
6+
# pip trusted resources
7+
sudo touch /etc/pip.conf
8+
if grep -Fxq "[global]" /etc/pip.conf
9+
then
10+
echo "[global] not added to /etc/pip/.conf as already exists"
11+
else
12+
echo "[global]" | sudo tee -a /etc/pip.conf
13+
fi
14+
if grep -Fxq "trusted-host = pypi.python.org pypi.org files.pythonhosted.org" /etc/pip.conf
15+
then
16+
echo "trusted-hosts not added to /etc/pip/.conf as already exists"
17+
else
18+
echo "trusted-host = pypi.python.org pypi.org files.pythonhosted.org" | sudo tee -a /etc/pip.conf
19+
fi
20+
if grep -Fxq "cert = /config/ssl/cert.pem" /etc/pip.conf
21+
then
22+
echo "cert not added to /etc/pip/.conf as already exists"
23+
else
24+
echo "cert = /config/ssl/cert.pem" | sudo tee -a /etc/pip.conf
25+
fi
26+
27+
# conda ssl
28+
cp /config/ssl/cert.pem /miniconda/ssl/cert.pem
29+
30+
printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' -

0 commit comments

Comments
 (0)