|
|
|
|
|
FROM python:3.10-slim |
|
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1 |
|
|
ENV PYTHONUNBUFFERED=1 |
|
|
|
|
|
ENV PIP_DEFAULT_TIMEOUT=1200 |
|
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \ |
|
|
ffmpeg git build-essential curl libsm6 libxext6 libgl1 \ |
|
|
&& rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
|
|
|
|
|
|
RUN pip install --no-cache-dir --upgrade pip \ |
|
|
&& pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu |
|
|
|
|
|
|
|
|
COPY requirements.txt /tmp/requirements.txt |
|
|
RUN pip install --no-cache-dir -r /tmp/requirements.txt |
|
|
|
|
|
|
|
|
COPY . /app |
|
|
WORKDIR /app |
|
|
|
|
|
|
|
|
ENV PORT=7860 |
|
|
|
|
|
|
|
|
CMD ["python", "app.py"] |
|
|
|