| FROM curlimages/curl:8.12.1 AS curlbin |
| FROM minio/mc:latest AS mcbin |
| FROM python:3.12-alpine AS hfpy |
|
|
| RUN unset HTTP_PROXY HTTPS_PROXY ALL_PROXY http_proxy https_proxy all_proxy && \ |
| pip install --no-cache-dir 'huggingface_hub==1.4.1' |
|
|
| FROM ghcr.io/sagernet/sing-box:v1.12.12 AS singboxbin |
|
|
| FROM eceasy/cli-proxy-api:latest |
|
|
| # Keep behavior from upstream image but run under neutral paths/names. |
| WORKDIR /opt/daili |
| COPY --from=curlbin /usr/bin/curl /usr/bin/curl |
| COPY --from=curlbin /usr/lib/ /usr/lib/ |
| COPY --from=curlbin /lib/ /lib/ |
| COPY --from=mcbin /usr/bin/mc /usr/bin/mc |
| COPY --from=hfpy /usr/local/ /usr/local/ |
| COPY --from=singboxbin /usr/local/bin/sing-box /usr/local/bin/sing-box |
| RUN cp /CLIProxyAPI/CLIProxyAPI /usr/local/bin/daili-gateway && chmod +x /usr/local/bin/daili-gateway |
|
|
| ENV WRITABLE_PATH=/tmp |
| ENV USAGE_AUTOSAVE_INTERVAL=300 |
|
|
| COPY entrypoint.sh /opt/daili/entrypoint.sh |
| COPY hf_snapshot.py /opt/daili/hf_snapshot.py |
| COPY model_price_bootstrap.py /opt/daili/model_price_bootstrap.py |
| COPY objectstore_sync.py /opt/daili/objectstore_sync.py |
| COPY cleanup_invalid_auths.py /opt/daili/cleanup_invalid_auths.py |
| COPY ss_bridge.py /opt/daili/ss_bridge.py |
| RUN chmod +x /opt/daili/entrypoint.sh |
|
|
| EXPOSE 8317 |
|
|
| CMD ["/opt/daili/entrypoint.sh"] |
|
|