SafeLicensing / Dockerfile
FahimFBA's picture
Update Dockerfile
33fc075 verified
Raw History Blame Contribute Delete
663 Bytes
# Use an official Python runtime as a parent image
FROM python:3.9-slim
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
# Install system dependencies
RUN apt-get update && apt-get install -y \
curl \
libglib2.0-0 \
libsm6 \
libxrender1 \
libxext6 \
libfontconfig1 \
libgl1 \
&& rm -rf /var/lib/apt/lists/*
# Set the working directory
WORKDIR /app
# Copy files
COPY . /app
# Install python packages
RUN pip install --no-cache-dir -r requirements.txt
# Spaces requires port 7860
EXPOSE 7860
# Run Streamlit
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]