Download Dockerfile from loveaim/Waveterm: direct link, hf CLI and curl.
- Browser
- Download file 508 Bytes
-
https://huggingface.co/spaces/loveaim/Waveterm/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/loveaim/Waveterm/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/loveaim/Waveterm/resolve/main/Dockerfile
508 Bytes
| # 构建阶段 | |
| FROM golang:1.21-alpine AS builder | |
| WORKDIR /app | |
| # 只复制代码文件 | |
| COPY main.go . | |
| # 【重点】在容器内部自动初始化环境并拉取 github.com/google/uuid 等依赖 | |
| RUN go mod init hf-proxy && \ | |
| go mod tidy && \ | |
| CGO_ENABLED=0 GOOS=linux go build -o proxy-server . | |
| # 运行阶段 | |
| FROM alpine:latest | |
| RUN apk add --no-cache ca-certificates | |
| WORKDIR /app | |
| COPY --from=builder /app/proxy-server . | |
| # HF 强制要求的端口 | |
| EXPOSE 7860 | |
| ENV PORT=7860 | |
| CMD ["./proxy-server"] |