Spaces:
Sleeping
Sleeping
Download Dockerfile from earncoding/pixelperfect: direct link, hf CLI and curl.
- Browser
- Download file 911 Bytes
-
https://huggingface.co/spaces/earncoding/pixelperfect/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/earncoding/pixelperfect/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/earncoding/pixelperfect/resolve/main/Dockerfile
911 Bytes
| # Use an official Python runtime as a parent image | |
| FROM python:3.9-slim | |
| # Set the working directory in the container | |
| WORKDIR /code | |
| # --- FIX FOR NUMBA CACHING --- | |
| # Point the cache to the universally writable /tmp directory. | |
| ENV NUMBA_CACHE_DIR /tmp/numba_cache | |
| # --- FIX FOR REMBG MODEL CACHING --- | |
| # Point the model cache to the universally writable /tmp directory as well. | |
| # This solves all permission issues because any user can write to /tmp. | |
| ENV U2NET_HOME /tmp/u2net_models | |
| # Copy the requirements file into the container at /code | |
| COPY ./app/requirements.txt /code/requirements.txt | |
| # Install any needed packages specified in requirements.txt | |
| RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt | |
| # Copy the rest of the application code into the container | |
| COPY ./app /code/app | |
| # The command to run your application | |
| CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"] |