Spaces:
Sleeping
Sleeping
Download Dockerfile from prolau/3d-sim-platform: direct link, hf CLI and curl.
- Browser
- Download file 771 Bytes
-
https://huggingface.co/spaces/prolau/3d-sim-platform/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/prolau/3d-sim-platform/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/prolau/3d-sim-platform/resolve/main/Dockerfile
771 Bytes
| FROM node:18-bullseye AS frontend-builder | |
| WORKDIR /app/frontend | |
| COPY frontend/package*.json ./ | |
| RUN npm install | |
| COPY frontend/ ./ | |
| RUN npm run build | |
| FROM python:3.9-slim | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH | |
| WORKDIR $HOME/app | |
| # Install dependencies | |
| COPY --chown=user:user frontend/requirements.txt ./ | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy backend code | |
| COPY --chown=user:user frontend/api ./api | |
| COPY --chown=user:user frontend/.env ./ | |
| # Copy compiled frontend from builder | |
| COPY --chown=user:user --from=frontend-builder /app/frontend/dist ./frontend/dist | |
| # Expose Hugging Face Space port | |
| EXPOSE 7860 | |
| # Start FastAPI | |
| CMD ["uvicorn", "api.index:app", "--host", "0.0.0.0", "--port", "7860"] | |