Spaces:
Paused
Paused
File size: 736 Bytes
eb15991 2e546b0 eb15991 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | 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"]
|