jugaadutranslator / Dockerfile
Syed-Adnan's picture
Update Dockerfile
fed8cd8 verified
raw
history blame contribute delete
846 Bytes
# 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"]