Spaces:
Sleeping
Sleeping
Download Dockerfile from Freellm-api/private: direct link, hf CLI and curl.
- Browser
- Download file 643 Bytes
-
https://huggingface.co/spaces/Freellm-api/private/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Freellm-api/private/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Freellm-api/private/resolve/main/Dockerfile
643 Bytes
| # 1. Pull the official image used in the docker-compose.yml update | |
| FROM ghcr.io/tashfeenahmed/freellmapi:latest | |
| # 2. Hugging Face requires apps to bind to 0.0.0.0 and listen on port 7860 | |
| ENV NODE_ENV=production | |
| ENV HOST_BIND=0.0.0.0 | |
| ENV PORT=7860 | |
| # 3. Hugging Face runs containers as a non-root user (uid 1000). | |
| # We need to create the volume directory and grant the correct permissions so the app doesn't crash. | |
| USER root | |
| RUN mkdir -p /app/server/data && \ | |
| chown -R 1000:1000 /app/server/data && \ | |
| chmod -R 777 /app/server/data | |
| # Switch back to the required non-root user | |
| USER 1000 | |
| # 4. Expose the Hugging Face port | |
| EXPOSE 7860 |