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: docs/documentation/docker.md
+29-29Lines changed: 29 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,13 +5,13 @@
5
5
- Install Docker on [Mac](https://docs.docker.com/desktop/setup/install/mac-install/), [Windows](https://docs.docker.com/desktop/setup/install/windows-install/), or [Linux](https://docs.docker.com/desktop/setup/install/linux/).
6
6
7
7
Via Docker Desktop GUI,
8
-
- Search for [sbryngelson/mfc](https://hub.docker.com/r/sbryngelson/mfc) repository where all MFC images are stored then pull a release tag (e.g. `latest-cpu`).
8
+
- Search for [sbryngelson/mfc](https://hub.docker.com/r/sbryngelson/mfc) repository where all the MFC images are stored then pull a release tag (e.g.,`latest-cpu`).
9
9
10
-
Read through **Tag Details** below to distinguish between them. Docker Desktop's left sidebar has two key tabs: **Images** stores your program copies, while **Containers** shows instances of those images. You can launch multiple containers from a single image.
10
+
Read through the **Tag Details** below to distinguish between them. Docker Desktop's left sidebar has two key tabs: **Images** stores your program copies, while **Containers** shows instances of those images. You can launch multiple containers from a single image.
11
11
12
12
- Start a container by clicking the Run button in the Images tab.
13
13
14
-
Use the *Exec* section to interact with MFC directly via terminal, the *Files* section to transfer files between your device and container, and the *Stats* section displays resource usage of it.
14
+
Use the *Exec* section to interact with MFC directly via terminal, the *Files* section to transfer files between your device and container, and the *Stats* section to display resource usage.
Docker by default selects the compatible architecture when pulling and running a container. However, you can manually specify your platform (i.e. `linux/amd64` for most devices or `linux/arm64`for Apple Silicon).
27
+
Docker by default selects the compatible architecture when pulling and running a container. However, you can manually specify your platform (i.e.,`linux/amd64` for most devices or `linux/arm64`for Apple Silicon).
28
28
```bash
29
29
docker run -it --rm --entrypoint bash --platform linux/amd64 sbryngelson/mfc:latest-cpu
30
30
```
31
31
<br>
32
32
33
33
## Running Containers
34
34
35
-
Start a CPU container
35
+
Start a CPU container.
36
36
```bash
37
37
docker run -it --rm --entrypoint bash sbryngelson/mfc:latest-cpu
38
38
```
39
-
Start a GPU container
39
+
Start a GPU container.
40
40
```bash
41
-
docker run -it --rm --entrypoint bash --gpus all sbryngelson/mfc:latest-gpu
41
+
docker run -it --rm --gpus all --entrypoint bash sbryngelson/mfc:latest-gpu
42
42
```
43
-
**Note:**`--gpus all` exposes the container to available GPUs, and only Nvidia GPUs are currently supported. Make sure your device CUDA version is at least 12.3 to avoid backward compatibility issues.
43
+
**Note:**`--gpus all` exposes the container to available GPUs, and only Nvidia GPUs are currently supported. Make sure your device's CUDA version is at least 12.3 to avoid backward compatibility issues.
44
44
45
-
*⚠️ Append the `--debug` option to the `./mfc.sh` command inside the container with **Apple Silicon** (ARM-based Architecture) to bypass any potential errors or run `./mfc.sh clean && ./mfc.sh build` if needed.*
46
45
<br>
47
46
<br>
48
47
49
48
**Mounting Directory:**
50
49
51
-
Mount a directory to `mnt` inside the container to easily transfer files between the host and the container, e.g. `cp -r <source> /mnt/`.
50
+
Mount a directory to `mnt` inside the container to easily transfer files between the host and the container, e.g. `cp -r <source> /mnt/destination>`.
52
51
```bash
53
52
docker run -it --rm --entrypoint bash -v "$PWD":/mnt sbryngelson/mfc:latest-cpu
54
53
```
55
54
<br>
56
55
57
56
**Shared Memory:**
58
57
59
-
Increase the shared memory size to prevent MPI memory binding errors which may fail some tests and cases. Otherwise, you can disable MPI inside the container `--no-mpi`.
58
+
Increase the shared memory size to prevent MPI memory binding errors which may fail some tests and cases. Otherwise, you can disable MPI inside the container (`--no-mpi`).
60
59
```bash
61
-
docker run -it --rm --entrypoint bash --shm-size=<e.g. 4gb> sbryngelson/mfc:latest-cpu
60
+
docker run -it --rm --entrypoint bash --shm-size=<e.g., 4gb> sbryngelson/mfc:latest-cpu
`/sim` directory contains all simulation files including case setup (`case.py`).
135
+
`/sim` directory should all the simulation files, including the case setup (`case.py`).
137
136
138
-
`--fakeroot --writable-tmpfs` are critical to:
139
-
- Enable root-like permissions inside the container without actual root access
140
-
- Allow temporary write access to the container filesystem
137
+
`--nv --fakeroot --writable-tmpfs`, these flags are critical to:
138
+
- Grant access to the host system's Nvidia GPU and its CUDA libraries.
139
+
- Enable root-like permissions inside the container without actual root access.
140
+
- Allow temporary write access to the container filesystem.
141
141
142
142
143
143
@@ -160,7 +160,7 @@ mfc:vx.x.x-xxx-ubuntu-xx.xx # amd64 natively-supported version
160
160
mfc:vx.x.x-xxx-ubuntu-xx.xx-arm # arm64 natively-supported version
161
161
```
162
162
### **Architecture Support**
163
-
You can specify the desired architecture with `--platform <os>/<arch>` - either `linux/amd64` or `linux/arm64`. If not sure, Docker automatically selects the available image compatible with your system architecture. If native support isn't available, QEMU emulation is enabled for the following architectures albeit with degraded performance.
163
+
You can specify the desired architecture with `--platform <os>/<arch>` - either `linux/amd64` or `linux/arm64`. If unsure, Docker automatically selects the compatible image with your system architecture. If native support isn't available, QEMU emulation is enabled for the following architectures albeit with degraded performance.
0 commit comments