Spaces:
Sleeping
Sleeping
File size: 656 Bytes
1f8e25f a18e884 32e3908 a18e884 32e3908 a18e884 ad17fdb 32e3908 1f8e25f 32e3908 ad17fdb 32e3908 ad17fdb 32e3908 1f8e25f 32e3908 a18e884 32e3908 | 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 31 32 33 34 35 36 37 38 | FROM python:3.11-slim
WORKDIR /app
RUN apt-get update && apt-get install -y \
libglib2.0-0 \
libgomp1 \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir \
flask==3.0.0 \
pillow==10.0.0 \
numpy==1.26.0 \
gunicorn==21.2.0
RUN pip install --no-cache-dir \
torch==2.1.0 \
torchvision==0.16.0 \
--index-url https://download.pytorch.org/whl/cpu
RUN pip install --no-cache-dir \
tensorflow==2.17.0 \
keras==3.4.1
COPY . .
EXPOSE 7860
CMD ["gunicorn", "app:app", \
"--bind", "0.0.0.0:7860", \
"--workers", "1", \
"--timeout", "120", \
"--preload"] |