Skip to content

Commit 32b71d3

Browse files
authored
Update utils.sh
1 parent 07c081c commit 32b71d3

File tree

1 file changed

+24
-12
lines changed

1 file changed

+24
-12
lines changed

scripts/utils.sh

+24-12
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,33 @@
11
#!/bin/bash
22

33
function init_venv {
4-
conda deactivate # activated by default in Sagemaker Studio Lab
5-
python3 -m venv $1
6-
# echo "Appending path to venv to .bashrc..."
7-
# echo "source $1/bin/activate" >> $HOME/.bashrc
8-
9-
echo "Appending to .gitignore..."
10-
echo "source $1/bin/activate" >> .gitignore
11-
12-
echo "Activating venv..."
13-
source $1/bin/activate
4+
conda deactivate # activated by default in Sagemaker Studio Lab
5+
python3 -m venv $1
6+
# echo "Appending path to venv to .bashrc..."
7+
# echo "source $1/bin/activate" >> $HOME/.bashrc
8+
9+
echo "Appending to .gitignore..."
10+
echo "source $1/bin/activate" >> .gitignore
11+
12+
echo "Activating venv..."
13+
source $1/bin/activate
14+
}
15+
16+
function init_conda {
17+
conda create --name $1 --file requirements.txt
18+
conda activate $1
19+
# conda update -n base conda
20+
# Edit $HOME/.bashrc as appropriate
1421
}
1522

1623
function install_pip {
17-
pip install --upgrade pip
18-
pip install -r requirements.txt
24+
pip install --upgrade pip
25+
pip install -r requirements.txt
26+
}
27+
28+
function install_kernel {
29+
# python3 -m ipykernel install --user --name $1
30+
ipython kernel install --user --name=$1
1931
}
2032

2133
function add_ll {

0 commit comments

Comments
 (0)