This document provides instructions for building and running the sportdx
Docker container, which is set up for GPU-accelerated PyTorch applications with GUI support via WSL2.
- Windows 10 or 11 with WSL2 enabled.
- NVIDIA GPU with the latest drivers installed.
- Docker Desktop for Windows with WSL2 backend and NVIDIA Container Toolkit.
- Open WSL2 and navigate to the directory containing the Dockerfile (after installing and running docker).
- Build the Docker image:
docker build -t sportdx .
To run the sportdx
container with GPU and GUI support:
-
Allow local connections to the X server:
xhost +local:docker
-
Run the container: (only use --gpus all if you have a gpu)
docker run -it --gpus all -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v $(pwd):/usr/src/app/KI-basierte-Erkennung-von-Bewegungen sportdx
docker run -it --gpus all -v $(pwd):/usr/src/app/KI-basierte-Erkennung-von-Bewegungen sportdx
If the container sportdx
is already created and you want to start it:
-
Start the container:
docker start sportdx
-
Attach to the container for interaction:
docker attach sportdx
├── checkpoints *Place motionbert checkpoint here*
├── configs *place config motionBert here*
├── models *yolov8 model will be here*
├── MotionBERT4sportDX *Motionbert fork*
├── outputs *outputs from yolov8 and motionbert*
├── videos/todo *add videos here*
├── dockerfile
├── main.py
├── README.md
└── requirements.txt
- The command
xhost +local:docker
opens up the X server for local connections and should be used with caution due to potential security implications. - The Docker setup is advanced and might require specific configurations based on your hardware and software environment.
- Ensure that your WSL2 and Docker Desktop are properly configured for GPU acceleration.