NVIDIA / workbench-example-hybrid-rag

An NVIDIA AI Workbench example project for Retrieval Augmented Generation (RAG)
Apache License 2.0
252 stars 642 forks source link

postbuild.sh creates invalid docker-in-docker.sh #15

Open freemansoft opened 3 months ago

freemansoft commented 3 months ago

Looking at this code, I don't know what it is doing because there isn't a docker.sock in the container.

postBuild..sh directly cats code into the container to talk to /var/host-run/docker.sock. The container doesn't actually have that socket in it. This code doesn't create that

Environment

Host: Linux Version: current version as of 2024/08/04 OS: Ubuntu Actual socket: /var/run/docker.sock

Code

postBuild.sh

cat <<EOM \| sudo tee /etc/profile.d/docker-in-docker.sh > /dev/null
--
 if ! groups workbench \| grep docker > /dev/null; then
  docker_gid=\$(stat -c %g /var/host-run/docker.sock)
  sudo groupadd -g \$docker_gid docker
  sudo usermod -aG docker workbench
 fi

EOM

logs

stat: cannot statx '/var/host-run/docker.sock': No such file or directory
groupadd: invalid group ID 'docker'
usermod: group 'docker' does not exist
Traceback (most recent call last):
freemansoft commented 3 months ago

Note that nim anywhere appears to do something different but they do a hostmount for /var/host-run and /var/run