-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Link colab * Create init.sh * Update init.sh * Update index.qmd * Update index.qmd
- Loading branch information
1 parent
a3af1cc
commit b2a4f7d
Showing
2 changed files
with
23 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
NOTEBOOK_NAME=$1 | ||
# ex: polars-tuto | ||
|
||
WORK_DIR="/home/onyxia/work" | ||
CLONE_DIR="${WORK_DIR}/repo-git" | ||
|
||
COURSE_DIR="${CLONE_DIR}/post/polars" | ||
|
||
# Clone course repository | ||
REPO_URL="https://github.com/inseefrlab/ssphub.git" | ||
git clone --depth 1 $REPO_URL $CLONE_DIR | ||
|
||
# Put relevant notebook in formation dir | ||
cp "${COURSE_DIR}/${NOTEBOOK_NAME}.ipynb" "${WORK_DIR}" | ||
|
||
# Remove useless repositories | ||
rm -rf $CLONE_DIR ${WORK_DIR}/lost+found | ||
|
||
# Open the relevant notebook when starting Jupyter Lab | ||
jupyter server --generate-config | ||
echo "c.LabApp.default_url = '/lab/tree/${NOTEBOOK_NAME}.ipynb'" >> /home/onyxia/.jupyter/jupyter_server_config.py |