Skip to content

Commit

Permalink
Merge pull request #49 from SeisSol/thomas/last_modifs
Browse files Browse the repository at this point in the history
use latest, change default SIF_NAME, change ln command
  • Loading branch information
Thomas-Ulrich authored May 22, 2024
2 parents e31b2b2 + 9382432 commit fc725fe
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 276 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The Docker container contains an interactive learning environment (Jupyter) whic
Please install [Docker](https://docs.docker.com/engine/install/), launch the Docker Desktop and then run

(i) For Frontera and all Intel/AMD machines:
- use label: hps-2024-frontera
- use label: latest

(ii) Macs with M1/M2/M3 ARM CPUs:
- use label: hps-2024-remote-arm
Expand Down
47 changes: 14 additions & 33 deletions frontera.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@ Then get an interactive session on a compute node. For example for a 30 min sess
idev -m 30 -N 1 --tasks-per-node 2 -p development
```

Then execute:
You can then pull and use the automatically generated container from the ci workflow:

```
module load tacc-apptainer
apptainer pull -F docker://seissol/training:hps-2024-frontera
apptainer build -f my-training.sif singularity.def
apptainer run my-training.sif
apptainer pull -F docker://seissol/training:latest
ln -sf $(realpath latest.sif) ~/my-training.sif
apptainer run ~/my-training.sif
```

You can also use the automatically generated container after pulling the docker container
Alternatively, you can build and use the container with:

```
module load tacc-apptainer
apptainer pull -F docker://seissol/training:hps-2024-frontera
apptainer run training_latest.sif
ln -s /absolute/path/to/training_latest.sif ~/my-training.sif
apptainer build -f my-training.sif singularity.def
ln -sf $(realpath my-training.sif) ~/my-training.sif
apptainer run ~/my-training.sif
```

You can abort the jupyter lab with Ctrl-C, confirm with `y`.
Expand Down Expand Up @@ -68,40 +68,21 @@ Sulawesi RS | 6 min
TPV13 | 12 s

## Interacting with Frontera from local machine

We present a workflow for running a Jupyter Lab remotely on Frontera, while interacting with it on your local machine.

You can take the following steps:

Step 1: change `SHARED_PATH="/your/path/to/container/"` in line 75 of `job.jupyter` to the path where your sigularity container is built.
Step 1: pull the docker and create the symbolic link to ~/my-training.sif as described above

Step 2: Run
```
sbatch -A <your_project> job.jupyter
```
Step 2: submit a VNC job on https://tap.tacc.utexas.edu/jobs/ (e.g. 1 node, 1 task)

Step 3: Check the job status with
```
squeue -u $USER
```
Step 3: Wait till job status: running and click on Connect.

Step 4: Once the status changes from `PD` to `R`, you will find the job output in a generated file `jupyter.out`.
Step 4: open a terminal on the remote desktop, and `source setup_modules_Frontera_vnc.sh`

Step 5: Check the last few lines with
```
tail -f jupyter.out
```
wait a few seconds until you get in `jupyter.out` something like:
```
TACC: got login node jupyter port 60320
TACC: created reverse ports on Frontera logins
TACC: Your jupyter notebook server is now running at https://frontera.tacc.utexas.edu:60320/?token=2e0fade1f8b1ce00b303a7e97dd962c5cd10c17f03a245e8c761ca7e1d5e1597
```
(and then Ctrl+C to stop monitoring the contents of `jupyter.out`)
Step 5: Run `swp -p 1 jupyter notebook` as suggested by the script. The jupyterlab should open.

Step 6: Paste the link to your local browser, you will have access to the Frontera environment on your local machine.
```
https://frontera.tacc.utexas.edu:60320/?token=2e0fade1f8b1ce00b303a7e97dd962c5cd10c17f03a245e8c761ca7e1d5e1597
```

## Visualization

Expand Down
238 changes: 0 additions & 238 deletions job.jupyter

This file was deleted.

10 changes: 6 additions & 4 deletions source_modules.sh → setup_modules_Frontera_vnc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,19 @@ module load tacc-apptainer

#
SHARED_PATH="/your/path/to/container/"
SIF_NAME="training_latest.sif"
SIF_NAME="$HOME/my-training.sif"

if [ ! -f $SIF_NAME ]; then
if [ ! -f $SHARED_PATH/$SIF_NAME ]; then
if [ ! -f $SHARED_PATH/training_latest.sif ]; then
# load the image if no image exists in the shared directory
echo "MNMN: pull the appatainer image"
apptainer pull -F docker://seissol/training:hps-2024-frontera
apptainer pull -F docker://seissol/training:latest
echo "MNMN: create symlink to the shared directory"
ln -sf $SHARED_PATH/training_latest.sif $SIF_NAME
else
# create symlink to the shared directory
echo "MNMN: create symlink to the shared directory"
ln -s $SHARED_PATH/$SIF_NAME $SIF_NAME
ln -sf $SHARED_PATH/training_latest.sif $SIF_NAME
fi
fi

Expand Down

0 comments on commit fc725fe

Please sign in to comment.