annading's picture
Update README.md
f1bc870 verified
---
title: Primate Batch Detection
emoji: πŸ’»
colorFrom: purple
colorTo: gray
sdk: gradio
sdk_version: 5.24.0
app_file: app_batch.py
pinned: false
license: apache-2.0
---
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
# Primate Batch Detection: Installation & Troubleshooting Guide
## Installation Guide
### 1. Set Up WSL (Windows Users Only)
If you're using Windows, you'll need to install the **Windows Subsystem for Linux (WSL)**:
[WSL Installation Guide (Microsoft)](https://learn.microsoft.com/en-us/windows/wsl/install)
We recommend using **Ubuntu 22.04** as your Linux distribution.
**Important:** Run all following commands in the **WSL terminal**, **not PowerShell**.
---
### 2. Install Docker
Follow these guides to install Docker in your WSL Ubuntu environment:
- [Install Docker Desktop (Linux)](https://docs.docker.com/desktop/setup/install/linux/ubuntu/)
- [Install Docker Engine (Ubuntu)](https://docs.docker.com/engine/install/ubuntu/)
---
### 3. Install the NVIDIA Container Toolkit
This is necessary for GPU support inside Docker containers:
[NVIDIA Container Toolkit Installation Guide](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html)
---
### 4. Run the Docker Container
Use the pre-configured Docker image provided by the Hugging Face Space:
[Run Docker Container](https://huggingface.co/spaces/caltech-animal-tracking/Primate_Batch_Detection?docker=true)
---
## Troubleshooting Guide
### 🚫 Error:
```docker: Error response from daemon: could not select device driver "" with capabilities: [[gpu]]```
### πŸ› οΈ Fix:
This typically means that the **NVIDIA Container Toolkit** was not installed or configured correctly. Double-check your installation by revisiting the [NVIDIA Container Toolkit Guide](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html).
### 🚫 Error:
```
docker: permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock:
Head "http://%2Fvar%2Frun%2Fdocker.sock/_ping": dial unix /var/run/docker.sock: connect: permission denied
```
### πŸ› οΈ Fix:
This error occurs when your user does not have permission to access the Docker socket.
You have two options:
**Option 1: Add your user to the Docker group**
```
sudo usermod -aG docker $USER
sudo systemctl restart docker # May not be needed or available in WSL
```
Then restart your terminal or log out and back in for the group change to take effect.
**Option 2: Use sudo for all your docker commands**
```
sudo docker $your_command
```