File size: 579 Bytes
9da3a16 7e8a152 9da3a16 e790d64 9da3a16 7e8a152 9da3a16 7e8a152 9da3a16 7e8a152 9da3a16 7e8a152 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# Use an official Python runtime as the base image
FROM python:3.10
# Install torch first to make it available for other packages' build processes
RUN pip install torch
# Copy requirements.txt and install remaining dependencies
COPY requirements.txt /tmp/requirements.txt
RUN pip install --no-cache-dir -r /tmp/requirements.txt
# Copy your application code to the container
COPY . /app
WORKDIR /app
# Expose the port (default for Gradio/Hugging Face Spaces is 7860)
EXPOSE 7860
# Command to run your application (adjust 'app.py' to your main script)
CMD ["python", "app.py"] |