Sample1 / Dockerfile
Nothing
Upload folder using huggingface_hub
e8c935d verified
Raw
History Blame Contribute Delete
557 Bytes
FROM python:3.11-slim
# Setup app as working directory
WORKDIR /app
# Copy requirements and install dependencies
COPY requirements.txt .
RUN pip install -r requirements.txt
# Copy application files
COPY model.pkl .
COPY custom_transformers.py .
COPY streamlit_app.py .
# Expose port for Streamlit (default Streamlit port)
EXPOSE 8501
# Command to run the application
# The --server.address=0.0.0.0 flag is important as it allows Streamlit to be accessible outside the container.
CMD ["streamlit", "run", "streamlit_app.py", "--server.address=0.0.0.0"]