Spaces:
Running
Running
Download Dockerfile from kugguk/electrocheap: direct link, hf CLI and curl.
- Browser
- Download file 746 Bytes
-
https://huggingface.co/spaces/kugguk/electrocheap/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/kugguk/electrocheap/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/kugguk/electrocheap/resolve/main/Dockerfile
746 Bytes
| FROM node:22-alpine AS frontend | |
| WORKDIR /build | |
| COPY package.json package-lock.json ./ | |
| RUN npm ci --no-audit --no-fund | |
| COPY index.html main.jsx App.jsx ChallengePanel.jsx AnalysisPanel.jsx LiveWorkspace.jsx EnergyIntro.jsx styles.css live.css intro.css vite.config.js ./ | |
| RUN npm run build | |
| FROM python:3.12-slim | |
| WORKDIR /app | |
| COPY requirements.txt ./ | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| RUN useradd --create-home --uid 1000 appuser && chown appuser:appuser /app | |
| COPY --chown=appuser:appuser *.py resources.zip resources_manifest.json ./ | |
| COPY --from=frontend --chown=appuser:appuser /build/dist ./dist | |
| USER appuser | |
| ENV PYTHONUNBUFFERED=1 OMP_NUM_THREADS=2 OPENBLAS_NUM_THREADS=2 MKL_NUM_THREADS=2 | |
| EXPOSE 7860 | |
| CMD ["python", "app.py"] | |