-
Notifications
You must be signed in to change notification settings - Fork 0
/
workspace.sh
40 lines (30 loc) · 1.05 KB
/
workspace.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
# This script assumes that conda is available in PATH
echo "Creating Environment and Kernel for w207 project"
# environment setup stuff
conda env create -f environment.lock.yaml --force
# MODIFY CONDA PATH below based on location of conda
source /home/ubuntu/anaconda3/etc/profile.d/conda.sh
conda activate leafydex
# jupyter kernel stuff
python --version
conda install -c anaconda ipykernel -y
python -m ipykernel install --user --name=leafydex
# additional python dependencies
python -m pip install black pre-commit kaggle
# pre commit stuff
pnpm i
chmod ug+x .husky/*
chmod ug+x .git/hooks/*
# git clone stuff
git clone https://github.com/cricksmaidiene/leafydex
cd leafydex
# kaggle and data stuff
mkdir ~/.kaggle
cp credentials/kaggle.json ~/.kaggle/kaggle.json
cd data
kaggle datasets download -d csafrit2/plant-leaves-for-image-classification
unzip plant-leaves-for-image-classification
echo "To remove the environment, run the following commands:"
echo "conda remove --name $conda_env_input"
echo "jupyter kernelspec remove $conda_env_input"