Skip to content

Commit

Permalink
fix: add tool to generate debian buster image with the workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
sileht committed Nov 9, 2020
1 parent ba7c839 commit 5570db4
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tools/build_docker_images_with_debian_workaround.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash
#
# Workaround due to:
# https://github.com/NVIDIA/nvidia-docker/issues/1399
# Until nvidia-docker get fixed we need this hack, so dede can see the GPUs

gen_dockerfile(){
base=$1
cat << EOF
FROM $base
USER root
RUN export DEBIAN_FRONTEND=noninteractive && apt-get update -y && apt-get install -y sudo
CMD bash -c "ldconfig; nvidia-smi ; sudo -u dd ./dede -host 0.0.0.0"
EOF
}

for image in jolibrain/deepdetect_gpu jolibrain/deepdetect_gpu_tensorrt ; do
docker pull ${image}
gen_dockerfile ${image} | docker build -t ${image}_buster_workaround -
done

0 comments on commit 5570db4

Please sign in to comment.