Skip to content

Commit 6df4fde

Browse files
authored
Add prod req and Dockerfile (#42)
1 parent d7ef774 commit 6df4fde

File tree

4 files changed

+13
-2
lines changed

4 files changed

+13
-2
lines changed

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ WORKDIR /app
1313
ENV PYTHONDONTWRITEBYTECODE=1 \
1414
PYTHONUNBUFFERED=1
1515

16-
COPY requirements.txt .
17-
RUN pip install --no-cache-dir -r requirements.txt
16+
COPY requirements.prod.txt .
17+
RUN pip install --no-cache-dir --index-url https://download.pytorch.org/whl/cpu torch==2.10.0
18+
RUN pip install --no-cache-dir -r requirements.prod.txt
1819

1920
COPY game ./game
2021
COPY rl ./rl

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ make setup
2222
pip install -r requirements.txt
2323
```
2424

25+
For deployment builds, the Dockerfile installs `requirements.prod.txt`, which
26+
includes runtime dependencies (FastAPI + RL model) but omits local dev/test tools.
27+
2528
## Run the dev servers
2629

2730
Backend API (FastAPI + reload):

requirements.prod.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
fastapi==0.128.0
2+
gymnasium==1.2.3
3+
numpy==2.4.1
4+
sb3-contrib==2.7.1
5+
stable-baselines3==2.7.1
6+
uvicorn[standard]==0.40.0

server/session_store.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from game.game import Game
1212
from game.game_state import GameState
1313

14+
1415
class AIPlayerProtocol(Protocol):
1516
async def get_action(self, game_state: GameState, legal_actions: list) -> object: ...
1617
def get_action_sync(self, game_state: GameState, legal_actions: list) -> object: ...

0 commit comments

Comments
 (0)