Download Dockerfile from Spooker/sinastock: direct link, hf CLI and curl.
- Browser
- Download file 900 Bytes
-
https://huggingface.co/spaces/Spooker/sinastock/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Spooker/sinastock/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Spooker/sinastock/resolve/main/Dockerfile
900 Bytes
| FROM rust:1.85-slim-bookworm AS builder | |
| RUN apt-get update \ | |
| && apt-get install -y --no-install-recommends pkg-config libssl-dev ca-certificates \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| COPY Cargo.toml Cargo.lock ./ | |
| COPY src ./src | |
| RUN cargo build --release | |
| FROM debian:bookworm-slim | |
| RUN apt-get update \ | |
| && apt-get install -y --no-install-recommends ca-certificates libssl3 \ | |
| && rm -rf /var/lib/apt/lists/* \ | |
| && useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH \ | |
| RUST_LOG=sina_realtime_collector=info,tower_http=warn | |
| WORKDIR /home/user/app | |
| COPY --from=builder /app/target/release/sina-realtime-collector /usr/local/bin/sina-realtime-api | |
| COPY --chown=user:user stocks_100.txt stocks_1000.txt stocks_all.txt ./ | |
| EXPOSE 7860 | |
| CMD ["sina-realtime-api", "--stocks", "stocks_100.txt", "--output", "data", "--chunk-size", "500"] | |