Spaces:
Runtime error
Runtime error
File size: 846 Bytes
fed8cd8 732d2fd cab7341 fbdaf65 9d1c023 fed8cd8 9d1c023 fed8cd8 9d1c023 cab7341 fbdaf65 9d1c023 fbdaf65 fed8cd8 9d1c023 cab7341 fed8cd8 9d1c023 cab7341 fbdaf65 a345a34 cab7341 fed8cd8 fbdaf65 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# Use a standard Python 3.10 image as the base
FROM python:3.10-slim
# Set the working directory inside the container
WORKDIR /app
# Install git, which is required by transformers for some models
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Copy the requirements file into the container
COPY requirements.txt ./
# Install the Python dependencies specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application files into the container
COPY . .
# Expose the port that Streamlit will run on (7860 for Hugging Face Spaces)
EXPOSE 7860
# Define the command to run the Streamlit application when the container starts
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.headless=true"]
|