Spaces:
Sleeping
Sleeping
Download docker/Dockerfile.alpine from chuanshen/MyWeChatQrcode: direct link, hf CLI and curl.
- Browser
- Download file 1.44 kB
-
https://huggingface.co/spaces/chuanshen/MyWeChatQrcode/resolve/main/docker/Dockerfile.alpine
- Command line
-
hf download hf://spaces/chuanshen/MyWeChatQrcode/docker/Dockerfile.alpine
-
curl -L -o Dockerfile.alpine https://huggingface.co/spaces/chuanshen/MyWeChatQrcode/resolve/main/docker/Dockerfile.alpine
1.44 kB
| FROM python:3.10-alpine | |
| LABEL maintainer="foo@bar.com" | |
| ARG TZ='Asia/Shanghai' | |
| ARG CHATGPT_ON_WECHAT_VER | |
| ENV BUILD_PREFIX=/app | |
| RUN apk add --no-cache \ | |
| bash \ | |
| curl \ | |
| wget \ | |
| && export BUILD_GITHUB_TAG=${CHATGPT_ON_WECHAT_VER:-`curl -sL "https://api.github.com/repos/zhayujie/chatgpt-on-wechat/releases/latest" | \ | |
| grep '"tag_name":' | \ | |
| sed -E 's/.*"([^"]+)".*/\1/'`} \ | |
| && wget -t 3 -T 30 -nv -O chatgpt-on-wechat-${BUILD_GITHUB_TAG}.tar.gz \ | |
| https://github.com/zhayujie/chatgpt-on-wechat/archive/refs/tags/${BUILD_GITHUB_TAG}.tar.gz \ | |
| && tar -xzf chatgpt-on-wechat-${BUILD_GITHUB_TAG}.tar.gz \ | |
| && mv chatgpt-on-wechat-${BUILD_GITHUB_TAG} ${BUILD_PREFIX} \ | |
| && rm chatgpt-on-wechat-${BUILD_GITHUB_TAG}.tar.gz \ | |
| && cd ${BUILD_PREFIX} \ | |
| && cp config-template.json ${BUILD_PREFIX}/config.json \ | |
| && /usr/local/bin/python -m pip install --no-cache --upgrade pip \ | |
| && pip install --no-cache -r requirements.txt --extra-index-url https://alpine-wheels.github.io/index\ | |
| && pip install --no-cache -r requirements-optional.txt --extra-index-url https://alpine-wheels.github.io/index\ | |
| && apk del curl wget | |
| WORKDIR ${BUILD_PREFIX} | |
| ADD ./entrypoint.sh /entrypoint.sh | |
| RUN chmod +x /entrypoint.sh \ | |
| && adduser -D -h /home/noroot -u 1000 -s /bin/bash noroot \ | |
| && chown -R noroot:noroot ${BUILD_PREFIX} | |
| USER noroot | |
| ENTRYPOINT ["/entrypoint.sh"] | |