# roomtsc 0.1 as an HTTP service. The build context is a release directory holding # model/ (code and weights) and this file; see deploy/release.sh. FROM python:3.14-slim ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 OMP_NUM_THREADS=2 HOME=/tmp MPLCONFIGDIR=/tmp # Versions match the environment the weights were written in, so the stored trees load. RUN pip install --no-cache-dir torch==2.14.1 --index-url https://download.pytorch.org/whl/cpu \ && pip install --no-cache-dir numpy==2.5.3 scikit-learn==1.9.1 spglib==2.7.0 pymatgen==2026.9.24 fastapi "uvicorn[standard]" WORKDIR /app COPY model/predict.py model/train.py model/dataset.py model/structure_types.py model/serve.py /app/model/ COPY model/weights /app/model/weights RUN useradd -r -u 10001 app USER app EXPOSE 8000 CMD ["uvicorn", "serve:app", "--app-dir", "/app/model", "--host", "0.0.0.0", "--port", "8000", "--workers", "2"]