sc / Dockerfile
LerinaOwO's picture
Upload 6 files
79d8a2e verified
Raw
History Blame Contribute Delete
532 Bytes
# Hugging Face Docker Space image for the Go OpenAI-compatible proxy.
FROM golang:alpine AS builder
WORKDIR /src
COPY go.mod ./
COPY main.go ./
RUN CGO_ENABLED=0 GOOS=linux go build -trimpath -ldflags="-s -w" -o /out/scnet-proxy ./main.go
FROM alpine:latest
RUN apk --no-cache add ca-certificates tzdata \
&& adduser -D -u 1000 user
WORKDIR /app
COPY --from=builder /out/scnet-proxy /app/scnet-proxy
ENV HOST=0.0.0.0 \
PORT=7860 \
CACHE_FILE=/tmp/conversations.json
EXPOSE 7860
USER user
CMD ["/app/scnet-proxy"]