depthmapflask / Dockerfile
srivatsavdamaraju's picture
Update Dockerfile
184bff0 verified
raw
history blame
749 Bytes
# Use an official Python runtime as a parent image
FROM python:3.8-slim
# Set the working directory in the container
WORKDIR /app
# Copy the current directory contents into the container at /app
COPY . /app
# Install system dependencies
RUN apt-get update && \
apt-get install -y \
python3-opencv \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender-dev \
&& rm -rf /var/lib/apt/lists/*
# Install dependencies from requirements.txt
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
# Expose port 7860 for Hugging Face Spaces (default port for web apps)
EXPOSE 7860
# Command to run the application using Gunicorn with multiple threads
CMD ["gunicorn", "-b", "0.0.0.0:7860", "--threads", "6", "app2:app"]