Skip to content

Commit 4a99bb0

Browse files
committed
Improve trainees' init script
1 parent 2db74a2 commit 4a99bb0

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

sspcloud/init-trainees.sh

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
#!/bin/bash
22

3+
# Get the name of the repo
4+
export MY_REPO=$(ls -d "/home/onyxia/work"/*/ | head -n 1 | xargs basename)
5+
6+
# Restore the environment
7+
sh $MY_REPO/sspcloud/restore_environment.sh
8+
9+
# Download data
10+
sh $MY_REPO/sspcloud/download_data.sh
11+
12+
13+
314
WORK_DIR="/home/onyxia/work"
415
GITHUB_REPOSITORY="https://github.com/InseeFrLab/AIML4OS-template-quarto-python.git"
516
NOTEBOOK_DOWNLOAD_URL="https://inseefrlab.github.io/AIML4OS-template-quarto-python/chapters/chapter1.ipynb"
617
BUCKET_PATH="s3/donnees-insee/diffusion/ETAT_CIVIL/2020/DECES_COM_1019.csv"
718
DEST_DIR="$HOME/work/data"
819
DEST_FILE="$DEST_DIR/$(basename "$BUCKET_PATH")"
920

10-
11-
# Download the pyproject.toml directly using git
12-
echo $GITHUB_REPOSITORY
13-
git clone --depth 1 $GITHUB_REPOSITORY temp
14-
15-
# Install dependencies in system env
16-
uv pip install -r temp/pyproject.toml --system
17-
rm -rf temp
18-
1921
# Download the dataset
2022
echo "Downloading $BUCKET_PATH to $DEST_FILE..."
2123
mc cp "$BUCKET_PATH" "$DEST_DIR"

0 commit comments

Comments
 (0)