OpenFakeDemo / Dockerfile
vicliv's picture
first commit
a635394
Raw
History Blame
588 Bytes
FROM python:3.11-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
libgl1 \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /code
COPY app/requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir torch==2.4.1 --index-url https://download.pytorch.org/whl/cpu \
&& pip install --no-cache-dir -r /code/requirements.txt
ENV HF_HOME=/code/.hf-cache
ENV PYTHONUNBUFFERED=1
COPY model.safetensors /code/model.safetensors
COPY app /code/app
EXPOSE 7860
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]