You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-9Lines changed: 17 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ TLDR: Search for `todo` and update all occurrences to your desired name
13
13
14
14
Docker and singularity is not a must unless you cannot install some dependencies locally on HPC shell environment due to permission issue
15
15
16
-
### Base Repo
16
+
### Base Repository
17
17
18
18
1. Change [LICENSE](LICENSE) if necessary
19
19
@@ -23,13 +23,15 @@ Docker and singularity is not a must unless you cannot install some dependencies
23
23
24
24
### Docker Config
25
25
26
+
Continue on a machine where you have docker permission, HPC clusters usually restrict docker access for security reasons
27
+
26
28
1. Modify `todo-docker-user`, `todo-image-name`, `todo-image-user` in [.env](.env)
27
29
28
30
-[.env](env) will be loaded when you use docker compose for build/run/push/...
29
31
-`todo-docker-user` refers to your docker hub account username
30
32
-`todo-image-user` refers to the default user inside the image, which is used to determine home folder
31
33
32
-
1. Modify the service name from `default` to your service name in [docker-compose.yml](docker-compose.yml), add additional volume mounting options such as dataset directories
34
+
1. Modify the service name from `todo-service-name` to your service name in [docker-compose.yml](docker-compose.yml), add additional volume mounting options such as dataset directories
33
35
34
36
1. Update [Dockerfile](docker/latest/Dockerfile) and [.dockerignore](.dockerignore)
35
37
@@ -38,39 +40,45 @@ Docker and singularity is not a must unless you cannot install some dependencies
38
40
39
41
1.[build_docker_image.sh](scripts/build_docker_image.sh) to build and test the image locally in your machine's architecture
40
42
41
-
- Do this on a machine where you have docker permission, HPC clusters usually restrict docker access for security reasons
42
43
- The scripts uses buildx to build multi-arch image, you can disable this by removing redundant archs in [docker-compose.yml](docker-compose.yml)
43
44
- Building stage does not have GPU access, if some of your dependencies need GPU, build them inside a running container and commit to the final image
44
45
45
-
1.To run and test a built image, use [run_docker_container.sh](scripts/run_docker_container.sh) or `docker compose up -d`
46
+
1.[run_docker_container.sh](scripts/run_docker_container.sh) or `docker compose up -d` to run and test a built image
46
47
47
48
- The service by default will mount the whole repository onto `CODE_FOLDER` inside the container so any modification inside also takes effect outside, which is useful when you use vscode remote extension to develop inside a running container with remote docker context
49
+
- You should be able to run and see GUI applications inside the container if `$DISPLAY` is set correctly when you run the script
48
50
49
51
1.[push_docker_image.sh](scripts/push_docker_image.sh) to push the multi-arch image to docker hub
50
52
51
53
- You should have the docker hub repository set up before pushing
52
54
53
55
### Singularity Config
54
56
57
+
Continue on the actual HPC cluster environment
58
+
55
59
1.[pull_singularity_image.sh](scripts/pull_singularity_image.sh) to build the singularity image locally
56
60
57
61
- Singularity image can be built upon existing docker image
62
+
- You should see the image `todo-image-name_latest.def` after successfully built
58
63
59
64
1.[run_singularity_instance.sh](scripts/run_singularity_instance.sh) to test the image
60
65
61
66
- Add additional volume binding options to the script such as dataset directories, best practice is to define in [.env](.env) then export in [variables.sh](scripts/variables.sh) with `resolve_host_path` to turn relative path into absolute real path
62
-
- Singularity instances by default has less environment isolation than docker containers unless you specify the additional options like the script
67
+
- Singularity instances by default have less environment isolation than docker containers unless you specify the additional options like the script
63
68
64
69
### Job Config
65
70
66
-
1. Modify job specifications under [jobs/](jobs/)
71
+
1. Modify job specifications under `jobs/`
67
72
68
73
- Each (HPC) Slurm environment has different partition definitions, which are often heterogeneous, you can query this by `sinfo` with some options
69
-
- All the jobs has `-l`(login) options in shebang so that any command working in your current shell environment should also run as a job
74
+
-`--ntasks-per-node` specifies number of parallelization, and it's convenient to tie other resources to task, e.g., `--gpus-per-task`, `--cpus-per-task`, `--mem-per-gpu`, so that you only need to increase ntasks to scale up on a node
75
+
- All the jobs have `-l`(login) options in shebang so that any command working in your current shell environment should also run as a job
76
+
77
+
1.`sbatch jobs/your-cluster/your-job.job` or `jobs/your-cluster/your-job.job` to submit jobs
70
78
71
-
1. Submit job by `sbatch jobs/your-cluster/your-job.job` or `jobs/your-cluster/your-job.job`
79
+
- You should see a file `todo_your_job_name_slurm_job_id.out` in the base folder of this repository, which contains job logs
72
80
73
-
1. Recommend [turm](https://github.com/kabouzeid/turm) for job monitor, use `turm -u your-slurm-user` after installation
81
+
1. Recommend [turm](https://github.com/kabouzeid/turm) for job monitor outside the job, use `turm -u your-slurm-user` after installation
# # follow the error information,replace all the “ipcp-unit-growth” with “ipa-cp-unit-growth” in 3rdparty/carotene/CMakeLists.txt and 3rdparty/carotene/hal/CMakeLists.txt
0 commit comments