File size: 1,354 Bytes
a4b12d5
ec4ae03
a4b12d5
 
ec4ae03
a4b12d5
 
ec4ae03
 
a4b12d5
ec4ae03
a4b12d5
 
 
 
ec4ae03
a4b12d5
ec4ae03
a4b12d5
 
 
ec4ae03
a4b12d5
 
ec4ae03
a4b12d5
ec4ae03
a4b12d5
 
ec4ae03
a4b12d5
ec4ae03
a4b12d5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# AxiomForgeAI β€” Hugging Face Docker Space
# ─────────────────────────────────────────────────────────────────────────────
# CPU-only build that exposes the OpenEnv math RL environment server.
# Listens on port 7860 (required by Hugging Face Spaces).
#
# The heavy ML stack (torch, PRM, flash-attn) is NOT installed here.
# The environment falls back to SymPy-only scoring, which works on CPU.
# ─────────────────────────────────────────────────────────────────────────────

FROM python:3.11-slim

# HF requires a non-root user
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"

WORKDIR /app

# Minimal runtime dependencies only (no torch/cuda/flash-attn)
COPY --chown=user requirements.space.txt requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt

# Copy project source
COPY --chown=user . /app

ENV PYTHONPATH="/app:$PYTHONPATH"

# Disable HF telemetry inside the Space
ENV HF_HUB_DISABLE_TELEMETRY=1

EXPOSE 7860

CMD ["uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "7860"]