Spaces:
Runtime error
Runtime error
Janne Hellsten
commited on
Commit
•
d3a616a
1
Parent(s):
ecfea65
Specify --shm-size=2g and fix typo in code comments
Browse filesFix OOM crash in data loader workers caused by docker's small default
shared memory size.
- docker_run.sh +3 -3
docker_run.sh
CHANGED
@@ -17,11 +17,11 @@ set -e
|
|
17 |
#
|
18 |
# Use it like:
|
19 |
#
|
20 |
-
# ./
|
21 |
#
|
22 |
# To override the default `stylegan2ada:latest` image, run:
|
23 |
#
|
24 |
-
# IMAGE=my_image:v1.0 ./
|
25 |
#
|
26 |
|
27 |
rest=$@
|
@@ -30,7 +30,7 @@ IMAGE="${IMAGE:-sg2ada:latest}"
|
|
30 |
|
31 |
CONTAINER_ID=$(docker inspect --format="{{.Id}}" ${IMAGE} 2> /dev/null)
|
32 |
if [[ "${CONTAINER_ID}" ]]; then
|
33 |
-
docker run --gpus all -it --rm -v `pwd`:/scratch --user $(id -u):$(id -g) \
|
34 |
--workdir=/scratch -e HOME=/scratch $IMAGE $@
|
35 |
else
|
36 |
echo "Unknown container image: ${IMAGE}"
|
|
|
17 |
#
|
18 |
# Use it like:
|
19 |
#
|
20 |
+
# ./docker_run.sh python generate.py --help
|
21 |
#
|
22 |
# To override the default `stylegan2ada:latest` image, run:
|
23 |
#
|
24 |
+
# IMAGE=my_image:v1.0 ./docker_run.sh python generate.py --help
|
25 |
#
|
26 |
|
27 |
rest=$@
|
|
|
30 |
|
31 |
CONTAINER_ID=$(docker inspect --format="{{.Id}}" ${IMAGE} 2> /dev/null)
|
32 |
if [[ "${CONTAINER_ID}" ]]; then
|
33 |
+
docker run --shm-size=2g --gpus all -it --rm -v `pwd`:/scratch --user $(id -u):$(id -g) \
|
34 |
--workdir=/scratch -e HOME=/scratch $IMAGE $@
|
35 |
else
|
36 |
echo "Unknown container image: ${IMAGE}"
|