Litter_Lens / Dockerfile
Yourgotoguy's picture
Update Dockerfile
de7388d verified
Raw
History Blame Contribute Delete
888 Bytes
# Use a Python base image.
FROM python:3.9-slim-bullseye
# Set the working directory inside the container
WORKDIR /app
# Install system dependencies required by OpenCV (cv2) and git
RUN apt-get update && \
apt-get install -y \
libgl1-mesa-glx \
libsm6 \
libxrender1 \
ffmpeg \
git \
--no-install-recommends && \
rm -rf /var/lib/apt/lists/*
# Copy your requirements.txt file and install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of your application code and assets into the container
COPY . /app
ENV HF_HOME /tmp
# Expose the port Streamlit runs on
EXPOSE 8501
# Command to run your Streamlit application
CMD ["python", "-m", "streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.enableXsrfProtection=false", "--server.enableCORS=false"]