SeedOfEvil's picture
Update Dockerfile
9ec0328 verified
raw
history blame
615 Bytes
# Use an official PyTorch GPU-enabled image (with CUDA 11.7 and cuDNN8)
FROM pytorch/pytorch:2.0.1-cuda11.7-cudnn8-runtime
# Set environment variables to avoid buffering issues
ENV PYTHONUNBUFFERED=1
# Install system dependencies
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
# Set the working directory
WORKDIR /app
# Copy requirements.txt and install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the application code
COPY app.py .
# Expose the default Gradio port
EXPOSE 7860
# Command to run the app
CMD ["python", "app.py"]