@@ -14,22 +14,28 @@ elif [ -z "${DIR}" ]; then
14
14
source ~ /.bashrc
15
15
if [ -f " environment.yml" ]; then
16
16
conda install -c conda-forge mamba -y
17
- mamba env create -f environment.yml --prefix ~ /.conda/envs/developer --force
17
+ mamba env create -f environment.yml --prefix ~ /.conda/envs/developer
18
18
~ /.conda/envs/developer/bin/python streamlit run $ENTRY --server.port=8501 --server.address=0.0.0.0
19
19
elif [ -f " requirements.txt" ]; then
20
20
/miniconda/bin/python -m pip install -r requirements.txt --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org
21
21
/miniconda/bin/python -m streamlit run $ENTRY --server.port=8501 --server.address=0.0.0.0
22
22
fi
23
23
elif [ -z " ${REPO} " ]; then
24
24
echo " No Github given, attempting to use directory."
25
- cd $DIR
25
+ if [ -d " $TARGET_DIR " ]; then
26
+ cd $DIR
27
+ else
28
+ echo " Cannot access $DIR , sleeping for 60 minutes."
29
+ sleep 3600
30
+ fi
26
31
/miniconda/bin/conda config --set ssl_verify False
27
32
/miniconda/bin/conda update -y conda
28
33
/miniconda/bin/conda init
29
34
source ~ /.bashrc
30
35
if [ -f " environment.yml" ]; then
31
36
conda install -c conda-forge mamba -y
32
- mamba env create -f environment.yml --prefix ~ /.conda/envs/developer --force
37
+ rm ~ /.conda/envs/developer
38
+ mamba env create -f environment.yml --prefix ~ /.conda/envs/developer
33
39
~ /.conda/envs/developer/bin/python streamlit run $ENTRY --server.port=8501 --server.address=0.0.0.0
34
40
elif [ -f " requirements.txt" ]; then
35
41
/miniconda/bin/python -m pip install -r requirements.txt --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org
0 commit comments