Image Issues
Solutions for Docker image building and package problems.
Image Build Fails
Symptoms:
$ image-create my-project
Error: Failed to build image
Common causes and solutions:
Network Issues
# Retry build
image-create my-project
# Check if base image cached
docker images | grep aime-pytorch
Package Installation Fails
# Use interactive GUI to fix packages
image-update # Select image, fix package names/versions
# Or check Dockerfile manually
cat ~/dockerfiles/my-project.Dockerfile
vim ~/dockerfiles/my-project.Dockerfile
image-update my-project --rebuild
Disk Space
Best to notify DSL admin by raising an issue ticket in ds01-hub repo. Most user permissions are restricted so you will not be able to do a full clean of docker except from those files related to you (limited).
df -h
docker system df
docker system prune # Free space
Invalid Dockerfile Syntax
# Validate Dockerfile
docker build --no-cache -f ~/dockerfiles/my-project.Dockerfile . 2>&1 | less
Package Not Found
Symptoms:
ModuleNotFoundError: No module named 'transformers'
Causes:
- Package not in image
- Package name typo
Note: DS01 containers ARE your Python environment - you don't need venv or conda. See Python Environments.
Solutions:
-
Check if installed:
pip list | grep transformers -
Temporary install:
pip install transformers -
Permanent fix (add to image):
exit # Exit containerimage-update # Select image, add packagecontainer-retire <project-name>container-deploy <project-name>
Image Too Large
Symptoms:
- Build takes very long
- "No space left on device"
Solutions:
-
Check image size:
docker images | grep my-project -
Use .dockerignore:
echo "data/" >> ~/workspace/<my-project>/.dockerignoreecho "*.csv" >> ~/workspace/<my-project>/.dockerignoreecho "models/" >> ~/workspace/<my-project>/.dockerignore -
Combine RUN commands:
# Bad (creates extra layers)RUN pip install package1RUN pip install package2# Good (single layer)RUN pip install package1 package2 -
Clean up in same layer:
RUN pip install --no-cache-dir packages && \apt-get clean && \rm -rf /var/lib/apt/lists/*
Image Won't Update
Symptoms:
- Changes to Dockerfile not reflected
- Old packages still installed
Solutions:
- Rebuild without cache:
image-update my-project --no-cache
- Recreate container after rebuild:
container-deploy my-project
Base Image Not Found
Symptoms:
Error: manifest for henrycgbaker/aime-pytorch:2.8.0-cuda12.4-ubuntu22.04 not found
Solutions:
-
Check available base images:
docker images | grep aime -
Pull base image:
docker pull henrycgbaker/aime-pytorch:2.8.0-cuda12.4-ubuntu22.04 -
Use different base image version:
# Edit Dockerfilevim ~/workspace/my-project/Dockerfile# Change FROM line to available image
Dependency Conflicts
Symptoms:
ERROR: Cannot install package-a and package-b because these package versions have conflicting dependencies
Solutions:
-
Pin specific versions:
RUN pip install transformers==4.30.0 datasets==2.14.0 -
Install in order:
RUN pip install torch==2.0.0 && \pip install transformers -
Create fresh environment:
RUN pip install --upgrade pip && \pip install package1 package2