| 118 | |
| 119 | == Use DeepXDE == |
| 120 | Discovery supports container by a software called `apptainer` [https://apptainer.org]. A precompiled DeepXDE image with Tensorflow v.2 backend is available at docker://chenggongdartmouth/deepxde:v1.2 or at docker://mkrish234/deepxde:v0.3 . |
| 121 | |
| 122 | You might need to build an appraiser image from the Docker image in Frontera. |
| 123 | First find the path to your login node on Frontera with `pwd`. Then, allocate a compute node with the following |
| 124 | {{{ |
| 125 | idev -m 60 -p rtx -N 1 -n 8 |
| 126 | }}} |
| 127 | Build the apptainer image from the Docker image as follows |
| 128 | {{{ |
| 129 | apptainer build <PATH_TO_LOGIN_NODE>/deepxde docker://mkrish234/deepxde:v0.3 |
| 130 | }}} |
| 131 | |
| 132 | The following is an example of using DeepXDE to run a script ./test.py on Frontera (with GPU node): |
| 133 | {{{ |
| 134 | #!/bin/bash |
| 135 | |
| 136 | #SBATCH -J job_name # job name |
| 137 | #SBATCH -o output.%j # output file named, output.jobID |
| 138 | #SBATCH -e error.%j # error file named, error.jobID |
| 139 | #SBATCH -p rtx # queue name |
| 140 | #SBATCH -N 1 # number of nodes requested |
| 141 | #SBATCH --ntasks-per-node 4 # tasks per node |
| 142 | #SBATCH -t 10:00:00 # time, hh:mm:ss |
| 143 | #SBATCH --mail-user=<EMAIL_ADDRESS> |
| 144 | #SBATCH --mail-type=all |
| 145 | |
| 146 | module load tacc-apptainer |
| 147 | stdbuf -i0 -o0 -e0 apptainer exec --nv --bind ~/:/mnt ~/deepxde python -u /mnt/test.py |
| 148 | }}} |