Refactor Dockerfile and requirements.txt for improved dependency management; update README.md with clearer installation options and instructions for prebuilt images.
This commit is contained in:
@ -15,11 +15,12 @@ RUN apt-get update && apt-get install -y \
|
||||
# Copy requirements first for better Docker layer caching
|
||||
COPY requirements.txt .
|
||||
|
||||
# Install Python dependencies
|
||||
# Install Python dependencies with pinned versions
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Install PyTorch with CUDA support (adjust based on your needs)
|
||||
RUN pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
|
||||
# Optional: Install CUDA-specific PyTorch if GPU support needed
|
||||
# Uncomment and modify for your CUDA version:
|
||||
# RUN pip install --force-reinstall torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
|
||||
|
||||
# Copy application code
|
||||
COPY . .
|
||||
|
||||
Reference in New Issue
Block a user