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

GPU Dependency in Docker Image Run Command Prevents Execution on Non-GPU Systems #66

Open
sudo-deep opened this issue Feb 11, 2024 · 0 comments
Assignees
Labels
bug Something isn't working Docker

Comments

@sudo-deep
Copy link

sudo-deep commented Feb 11, 2024

Environment 🖥️

  • OS Version: Ubuntu 20.04

  • Do you have a dedicated GPU ? [No]

  • Are you running this project natively or using Docker ? [Docker]

  • Is the issue present in the main branch or any of the development branches ? [Development branch]

Description 📖

  • Expected behavior: Docker image runs successfully
  • Actual behavior: Docker daemon throws an error

Steps to reproduce 👀

  1. Run run_devel.sh
  2. Select Option 2 (Ubuntu 22.04)
  3. Make sure you either test it on a non-gpu machine or uninstall nvidia container toolkit

Output 💥

docker: Error response from daemon: could not select device driver "" with capabilities: [[gpu]]

Additional Note 🚧

To address the docker: Error response from daemon: could not select device driver "" with capabilities: [[gpu]] issue when running without GPU, a conditional statement needs to be added in the run_devel.sh file.

Suggested solution:

# Add conditional check for GPU availability before using --gpus flag
if [ -z "$(command -v nvidia-smi)" ]; then
  # Handle case when no GPU is present
  echo "No GPU detected. Running without --gpus flag."
  # Add your additional commands here for non-GPU execution
else
  # GPU is present, use --gpus all
  echo "GPU detected. Running with --gpus all."
  # Add your original run command here with --gpus all
fi
@sudo-deep sudo-deep added bug Something isn't working Docker labels Feb 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Docker
Projects
None yet
Development

No branches or pull requests

2 participants