GPU Container Setup Guide
Install Docker and Docker Compose
Install NVIDIA Container Toolkit
Ensure NVIDIA GPU drivers are installed
.
├── Dockerfile # Container image definition
├── docker-compose.yml # Container service configuration
├── vsftpd.conf # FTP service configuration
├── entrypoint.sh # Container startup script
└── .env # Environment variables configuration
Build and Start Container
Create project directory and copy all necessary files
Configure environment variables file (.env)
Execute the following commands:
# Build and start container
docker-compose up -d --build
# Windows port forwarding settings
netsh interface portproxy add v4tov4 listenport=8152 listenaddress=0.0.0.0 connectport=2152 connectaddress=127.0.0.1
netsh interface portproxy add v4tov4 listenport=8151 listenaddress=0.0.0.0 connectport=2151 connectaddress=127.0.0.1
ssh dev1@172.16.201.84 -p 8152
FTP Connection (e.g., using FileZilla)
Host: 172.16.201.84
Username: user1
Password: pass1
Port: 8151
Ensure sufficient disk space on the host
Verify NVIDIA GPU drivers are correctly installed
Confirm Docker and NVIDIA Container Toolkit are properly configured
Regularly backup important data
Pay attention to security settings and update passwords periodically
Check container logs:
Check GPU availability:
Check container status:
Restart container: