| # Use Fedora as base | |
| FROM fedora:42 | |
| # ARG HF_TOKEN | |
| # | |
| # ENV HF_TOKEN=$HF_TOKEN | |
| # Install dependencies for building RPMs | |
| RUN dnf -y update && dnf -y install \ | |
| dnf-plugins-core \ | |
| rpm-build \ | |
| python3-devel \ | |
| gcc-c++ \ | |
| cmake \ | |
| git \ | |
| golang \ | |
| wget \ | |
| dnf-plugins-core \ | |
| make \ | |
| --setopt=install_weak_deps=False | |
| # Install all target Python versions | |
| RUN dnf -y install \ | |
| python3.13-devel \ | |
| python3.13 \ | |
| --setopt=install_weak_deps=False | |
| RUN dnf builddep python3-torch python3-torchvision python3-torchaudio -y | |
| RUN wget https://developer.download.nvidia.com/compute/cuda/13.1.1/local_installers/cuda-repo-fedora42-13-1-local-13.1.1_590.48.01-1.x86_64.rpm && \ | |
| sudo rpm -i cuda-repo-fedora42-13-1-local-13.1.1_590.48.01-1.x86_64.rpm && \ | |
| sudo dnf clean all && \ | |
| sudo dnf -y install cuda-toolkit-13-1 nvidia-open && \ | |
| sudo dnf clean all && \ | |
| which python3.13 | |
| RUN python3.13 -m pip install -U setuptools pip --ignore-installed && python3.13 -m pip install fastapi virtualenv --ignore-installed | |
| WORKDIR /app | |
| COPY . . | |
| ENTRYPOINT python3.13 /app/start.py |