File size: 861 Bytes
50f71a7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
FROM python:3.12-slim

WORKDIR /app

# ── Install deps from pre-downloaded wheels (no network needed, fast) ────────
COPY wheels/ wheels/
COPY requirements.txt .
RUN pip install --no-cache-dir --no-index --find-links=wheels/ \
    fastapi "uvicorn[standard]" "pydantic>=2.6.0" boto3 botocore requests \
 && rm -rf wheels/

# ── Source code (~87 KB, episodes excluded via .dockerignore) ────────────────
COPY . .

# ── Persistent dirs (mount as Docker volumes for persistence) ────────────────
RUN mkdir -p /app/memory /app/runs /app/episodes
VOLUME ["/app/memory", "/app/runs"]

ENV AWS_DEFAULT_REGION=us-east-1
ENV TRAIN_TASK=""
ENV TRAIN_EPISODES=50
ENV TRAIN_TEMP=0.4
ENV TRAIN_VERBOSE=0
ENV SERVER_PORT=8000

EXPOSE 8000

RUN chmod +x run.sh
CMD ["bash", "run.sh"]