Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optional GPU host requirement does not work with docker compose. #469

Open
RaphaelMelanconAtBentley opened this issue Jun 12, 2024 · 1 comment

Comments

@RaphaelMelanconAtBentley

When setting "host_requirements": {"gpu": "optional"}, the override adds the capability without the driver and count sections.

[2024-06-12T18:58:55.598Z] Stop (1970 ms): Run: docker build -f /tmp/devcontainercli-rmelancon/updateUID.Dockerfile-0.62.0 -t vsc-booster-ai-8960dda54929ced7aedbc1d531258379f1613874a876c5691c3e0f3082d263f1-uid --platform linux/amd64 --build-arg BASE_IMAGE=booster-ai-devcontainer:latest --build-arg REMOTE_USER=nonRootUser --build-arg NEW_UID=1000 --build-arg NEW_GID=1000 --build-arg IMAGE_USER=root /tmp/devcontainercli-rmelancon/empty-folder
[2024-06-12T18:58:55.599Z] Start: Run: docker info -f {{.Runtimes.nvidia}}
[2024-06-12T18:58:55.691Z] Stop (92 ms): Run: docker info -f {{.Runtimes.nvidia}}
[2024-06-12T18:58:55.692Z] Docker Compose override file for creating container:
services:
  'devcontainer':
    image: vsc-booster-ai-8960dda54929ced7aedbc1d531258379f1613874a876c5691c3e0f3082d263f1-uid
    entrypoint: ["/bin/sh", "-c", "echo Container started\n
trap \"exit 0\" 15\n
/usr/local/share/docker-init.sh\n
exec \"$$@\"\n
while sleep 1 & wait $$!; do :; done", "-"]
    environment:
      - IS_INSIDE_DEVCONTAINER=true
    labels:
      - 'devcontainer.local_folder=\\wsl.localhost\Ubuntu-22.04\home\rmelancon\repositories\Booster-AI'
      - 'devcontainer.config_file=/home/rmelancon/repositories/Booster-AI/.devcontainer/devcontainer.json'
    volumes:
      - /var/run/docker.sock:/var/run/docker-host.sock
      - profile:/root
      - /root/.vscode-server
      - vscode:/vscode
    deploy:
      resources:
        reservations:
          devices:
            - capabilities: [gpu]
volumes:
  
  profile:
  
  vscode:
    external: true

This results in the gpu not being available in the container.

@zuriel5zurielg20
Copy link

zuriel5zurielg20 commented Jun 14, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants