Download Dockerfile from mxmxk/cf: direct link, hf CLI and curl.
- Browser
- Download file 579 Bytes
-
https://huggingface.co/spaces/mxmxk/cf/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/mxmxk/cf/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/mxmxk/cf/resolve/main/Dockerfile
579 Bytes
| FROM golang:alpine AS builder | |
| RUN apk add --no-cache git | |
| ENV GOTOOLCHAIN=auto | |
| WORKDIR /app | |
| RUN --mount=type=secret,id=GH_REPO,required=true \ | |
| git clone $(cat /run/secrets/GH_REPO) . | |
| RUN go mod tidy | |
| RUN go build -o solver ./main.go | |
| FROM alpine:latest | |
| WORKDIR /app | |
| RUN apk add --no-cache \ | |
| chromium \ | |
| xvfb \ | |
| bash \ | |
| ca-certificates \ | |
| ttf-freefont \ | |
| udev | |
| COPY --from=builder /app/solver . | |
| ENV DEBUG=1 \ | |
| PORT=7860 \ | |
| XVFB_DISPLAY_BASE=99 \ | |
| ALLOW_NO_SANDBOX=true \ | |
| CHROME_PATH=/usr/bin/chromium-browser | |
| EXPOSE 7860 | |
| CMD ["./solver"] |