-
-
Save adampielak/3ca2bbc0d71a0958fee8bb75cda45ed7 to your computer and use it in GitHub Desktop.
Docker Compose configuration for isolated AI experiment environment with network isolation and resource limits
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Docker Compose for isolated AI environment | |
| # Provides network isolation and resource limits for AI experiments | |
| services: | |
| ai-sandbox: | |
| image: pytorch/pytorch:latest | |
| container_name: ai-experiment | |
| networks: | |
| - ai-isolated | |
| volumes: | |
| - ./models:/workspace/models:ro | |
| - ./data:/workspace/data | |
| environment: | |
| - CUDA_VISIBLE_DEVICES=0 | |
| deploy: | |
| resources: | |
| limits: | |
| cpus: '4' | |
| memory: 16G | |
| security_opt: | |
| - no-new-privileges:true | |
| read_only: true | |
| tmpfs: | |
| - /tmp | |
| networks: | |
| ai-isolated: | |
| driver: bridge | |
| internal: true # No external network access |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment