Download Dockerfile from ASI233/LLM: direct link, hf CLI and curl.
- Browser
- Download file 603 Bytes
-
https://huggingface.co/spaces/ASI233/LLM/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/ASI233/LLM/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/ASI233/LLM/resolve/main/Dockerfile
603 Bytes
| # Start from the official Golang image | |
| FROM golang:1.23-alpine AS build | |
| # Set working directory | |
| WORKDIR /app | |
| # Copy go.mod and go.sum files first for better caching | |
| COPY go.mod go.sum* ./ | |
| # Download dependencies | |
| RUN go mod download | |
| # Copy the source code | |
| COPY . . | |
| # Build the application | |
| RUN CGO_ENABLED=0 GOOS=linux go build -o main ./main.go | |
| # Create a minimal production image | |
| FROM alpine:latest | |
| # Create app directory and set permissions | |
| WORKDIR /app | |
| COPY --from=build /app/main . | |
| # Command to run the executable | |
| CMD ["./main"] |