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/dgx_spark.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -125,9 +125,9 @@ The script will initialize, use the models from your mounted cache, and begin th
125
125
126
126
## Part 4: Accessing Your Generated Image
127
127
128
-
The generation script saves the final image to its working directory (/app) inside the container. Here is the complete workflow to get that image onto your Mac.
128
+
The generation script saves the final image to its working directory (/app) inside the container. Here is the complete workflow to get that image onto your Laptop.
129
129
130
-
### Step 1: Copy the Image from Container to VM
130
+
### Step 1: Copy the Image from Container to DGX Spark
131
131
132
132
Open a new terminal window. Do not close the terminal where the container is running.
133
133
First, find your container's ID:
@@ -140,22 +140,22 @@ Look for the container with the image maxdiffusion-arm-gpu and note its ID (e.g.
140
140
Now, copy the image from the container to a temporary location on DGX Spark and fix its permissions.
141
141
142
142
```bash
143
-
# Copy the file to the /tmp/ directory on the VM
143
+
# Copy the file to the /tmp/ directory on DGX Spark
# Change the file's owner to your user to avoid permission errors
147
147
sudo chown username:username /tmp/flux_0.png
148
148
```
149
149
150
-
### Step 2: Copy the Image from VM to Your MAC
150
+
### Step 2: Copy the Image from DGX Spark to Your Laptop
151
151
152
152
Now, open the Terminal app on your Laptop and use the scp (secure copy) command to download the file from DGX Spark.
153
153
154
154
```bash
155
155
scp username@spark:/tmp/flux_0.png .
156
156
```
157
157
158
-
This command will download flux_0.png to the current directory on your Mac. You can now view your generated image!
158
+
This command will download flux_0.png to the current directory on your Laptop. You can now view your generated image!
159
159
160
160
## Troubleshooting and Common Pitfalls
161
161
@@ -171,14 +171,14 @@ Here are solutions to common issues you might encounter:
171
171
-**Solution**: This is solved by launching the container with the `-v ~/.cache/huggingface:/root/.cache/huggingface` flag, which gives the container access to your local model cache.
172
172
- Error: `open ... permission denied` when trying to access a copied file.
173
173
-**Cause**: Files copied from a Docker container with docker cp are owned by the root user by default.
174
-
-**Solution**: After copying the file to the VM, immediately run `sudo chown your_user:your_user /path/to/file` to take ownership before trying to access or transfer it.
174
+
-**Solution**: After copying the file to the DGX Spark, immediately run `sudo chown your_user:your_user /path/to/file` to take ownership before trying to access or transfer it.
175
175
- Can't find the generated image.
176
176
-**Cause**: The script may not be saving the image to the directory specified by the output_dir argument.
177
177
-**Solution**: Always check the script's source code to confirm the final save location. As we discovered, generate_flux.py saves to the current working directory (/app), not /tmp. Knowing this allows you to copy the file from the correct location.
178
178
- If a process requires more memory than the available RAM, your system will crash with an "Out-of-Memory" (OOM) error.
179
179
-`Swap memory is your safety net.` It's a designated space on your hard drive that the operating system uses as a "virtual" extension of your RAM. When RAM is full, the system moves less active data to the slower swap space, freeing up RAM for the immediate task. While it's slower than RAM, it's infinitely better than a system crash, ensuring your long-running training or generation jobs can complete successfully. For a machine with 119GB of RAM, adding 64GB of swap provides a robust buffer for memory-intensive operations.
180
180
- Step 1: Create a 64GB Swap File
181
-
- Run these commands on your spark-1c91 VM to create, format, and enable a permanent 64GB swap file.
181
+
- Run these commands on your DGX Spark to create, format, and enable a permanent 64GB swap file.
0 commit comments