Spaces:
Paused
Paused
Download Dockerfile from Subham9126/ohlc_data: direct link, hf CLI and curl.
- Browser
- Download file 736 Bytes
-
https://huggingface.co/spaces/Subham9126/ohlc_data/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Subham9126/ohlc_data/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Subham9126/ohlc_data/resolve/main/Dockerfile
736 Bytes
| FROM ubuntu:22.04 | |
| RUN apt-get update && \ | |
| apt-get install -y --no-install-recommends ca-certificates && \ | |
| rm -rf /var/lib/apt/lists/* | |
| # HuggingFace Spaces requires non-root user | |
| RUN useradd -m -u 1000 appuser | |
| WORKDIR /app | |
| # Copy pre-built binary (built with: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o api ./cmd/api) | |
| COPY api . | |
| RUN chmod +x /app/api | |
| COPY config.json . | |
| COPY holiday.json . | |
| # Create data directory | |
| RUN mkdir -p /app/data && chown -R appuser:appuser /app | |
| USER appuser | |
| # HuggingFace Spaces ONLY exposes port 7860 | |
| EXPOSE 7860 | |
| ENV PIPE_API_PORT=7860 | |
| ENV PIPE_PARQUET_BASE=/app/data | |
| ENV PIPE_HOLIDAY_FILE=/app/holiday.json | |
| CMD ["./api", "-config", "/app/config.json", "-holidays", "/app/holiday.json"] | |