Download Dockerfile from masp307/DefakeNet: direct link, hf CLI and curl.
- Browser
- Download file 707 Bytes
-
https://huggingface.co/spaces/masp307/DefakeNet/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/masp307/DefakeNet/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/masp307/DefakeNet/resolve/main/Dockerfile
707 Bytes
| FROM node:18 AS frontend-builder | |
| WORKDIR /frontend | |
| COPY ./frontend/package*.json ./ | |
| RUN npm install | |
| COPY ./frontend . | |
| RUN npm run build | |
| FROM python:3.9 | |
| # System deps needed by OpenCV (libGL) in headless environments | |
| RUN apt-get update \ | |
| && apt-get install -y --no-install-recommends libgl1 libglib2.0-0 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV PATH="/home/user/.local/bin:$PATH" | |
| WORKDIR /app | |
| COPY --chown=user ./requirements.txt requirements.txt | |
| RUN pip install --no-cache-dir --upgrade -r requirements.txt | |
| COPY --chown=user . /app | |
| COPY --from=frontend-builder /frontend/out /app/frontend_dist | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |