FROM nvidia/cuda:12.8.1-runtime-ubuntu24.04 ENV DEBIAN_FRONTEND=noninteractive \ PYTHONDONTWRITEBYTECODE=1 \ PYTHONUNBUFFERED=1 \ PORT=7860 RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates \ curl \ python3 \ python3-pip \ libgomp1 \ && rm -rf /var/lib/apt/lists/* WORKDIR /app COPY requirements.txt . RUN python3 -m pip install --no-cache-dir --break-system-packages -r requirements.txt COPY . . # Keep model acquisition in the image build, so starting a container never # downloads multi-gigabyte weights. curl fails the build on an incomplete or # unavailable download and retries transient network failures. RUN mkdir -p /app/model_weights \ && curl --fail --location --retry 5 --retry-all-errors \ --output /app/model_weights/rwkv7-g1i-1.5b-20260805-ctx16384.pth \ https://huggingface.co/BlinkDL/rwkv7-g1/resolve/main/rwkv7-g1i-1.5b-20260805-ctx16384.pth \ && curl --fail --location --retry 5 --retry-all-errors \ --output /app/model_weights/rwkv7-g1i-2.9b-20260805-ctx16384.pth \ https://huggingface.co/BlinkDL/rwkv7-g1/resolve/main/rwkv7-g1i-2.9b-20260805-ctx16384.pth \ && curl --fail --location --retry 5 --retry-all-errors \ --output /app/model_weights/rwkv7-g1i-7.2b-20260805-ctx16384.pth \ https://huggingface.co/BlinkDL/rwkv7-g1/resolve/main/rwkv7-g1i-7.2b-20260805-ctx16384.pth EXPOSE 7860 CMD ["python3", "app.py"]