Delete Dockerfile
Browse files- Dockerfile +0 -42
Dockerfile
DELETED
|
@@ -1,42 +0,0 @@
|
|
| 1 |
-
# Use official Python slim image
|
| 2 |
-
FROM python:3.11-slim
|
| 3 |
-
|
| 4 |
-
# Prevent Python from writing .pyc files and buffer stdout/stderr
|
| 5 |
-
ENV PYTHONDONTWRITEBYTECODE=1
|
| 6 |
-
ENV PYTHONUNBUFFERED=1
|
| 7 |
-
|
| 8 |
-
# Set working dir
|
| 9 |
-
WORKDIR /app
|
| 10 |
-
|
| 11 |
-
# Install system dependencies required for OpenCV and fonts, etc.
|
| 12 |
-
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 13 |
-
build-essential \
|
| 14 |
-
wget \
|
| 15 |
-
ca-certificates \
|
| 16 |
-
ffmpeg \
|
| 17 |
-
libsm6 \
|
| 18 |
-
libxext6 \
|
| 19 |
-
libxrender1 \
|
| 20 |
-
libglib2.0-0 \
|
| 21 |
-
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
| 22 |
-
|
| 23 |
-
# Copy requirements first for better caching
|
| 24 |
-
COPY requirements.txt /app/requirements.txt
|
| 25 |
-
|
| 26 |
-
# Upgrade pip, install dependencies
|
| 27 |
-
RUN pip install --upgrade pip
|
| 28 |
-
RUN pip install --no-cache-dir -r /app/requirements.txt
|
| 29 |
-
|
| 30 |
-
# Copy app source code
|
| 31 |
-
COPY . /app
|
| 32 |
-
|
| 33 |
-
# Create model directory (if you will mount model at runtime)
|
| 34 |
-
RUN mkdir -p /app/model && chmod -R 755 /app/model
|
| 35 |
-
|
| 36 |
-
# Expose port that HF Spaces expects
|
| 37 |
-
EXPOSE 8080
|
| 38 |
-
|
| 39 |
-
# Use gunicorn to run the Flask app
|
| 40 |
-
# --bind 0.0.0.0:8080 to listen on all interfaces
|
| 41 |
-
# Adjust workers/threads according to memory (lower for HF free spaces)
|
| 42 |
-
CMD ["gunicorn", "--bind", "0.0.0.0:8080", "app:app", "--workers", "2", "--threads", "2", "--timeout", "120"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|