Spaces:
Running
Running
File size: 667 Bytes
4e6d186 ddf36a5 4e6d186 f7a5c25 4e6d186 01de232 4e6d186 af95518 97c6aab 4e6d186 af95518 ddf36a5 e63fbb8 ddf36a5 4e6d186 af95518 ddf36a5 4e6d186 af95518 4e6d186 ddf36a5 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
FROM python:3.12
# Install system dependencies
RUN apt-get update -q \
&& apt-get install -qy --no-install-recommends wget git libopencv-dev python3-opencv \
&& apt-get autoremove -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Set up cache permissions
RUN mkdir -p /.cache && chmod -R 777 /.cache
# Set working directory
WORKDIR /data/app
# Copy requirements and install dependencies
COPY requirements.txt ./
RUN pip install --upgrade pip \
&& pip install -r requirements.txt \
&& pip install --no-cache-dir opencv-python-headless
# Copy application code
COPY . .
# Expose port
EXPOSE 7860
# Run application
CMD ["python", "/data/app/app.py"]
|