Spaces:
Sleeping
Sleeping
Download Dockerfile from ComplexDataLab/OpenFakeDemo: direct link, hf CLI and curl.
- Browser
- Download file 875 Bytes
-
https://huggingface.co/spaces/ComplexDataLab/OpenFakeDemo/resolve/c3e49145acc97ca072c29bfb21b84947d182a1bb/Dockerfile
- Command line
-
hf download hf://spaces/ComplexDataLab/OpenFakeDemo@c3e49145acc97ca072c29bfb21b84947d182a1bb/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/ComplexDataLab/OpenFakeDemo/resolve/c3e49145acc97ca072c29bfb21b84947d182a1bb/Dockerfile
875 Bytes
| FROM python:3.11-slim | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| 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 --extra-index-url https://download.pytorch.org/whl/cpu \ | |
| -r /code/requirements.txt | |
| ENV HF_HOME=/code/.hf-cache | |
| ENV PYTHONUNBUFFERED=1 | |
| RUN python -c "from transformers import AutoImageProcessor, AutoModelForImageClassification; \ | |
| AutoImageProcessor.from_pretrained('microsoft/swinv2-base-patch4-window16-256', cache_dir='/code/.hf-cache'); \ | |
| AutoModelForImageClassification.from_pretrained('microsoft/swinv2-base-patch4-window16-256', cache_dir='/code/.hf-cache')" | |
| COPY model.safetensors /code/model.safetensors | |
| COPY app /code/app | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"] | |