forked from SHADE-AI/diplomacy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
51 lines (32 loc) · 1.02 KB
/
Dockerfile
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# syntax=docker/dockerfile:1
FROM node:20.18.0-alpine3.20 AS app-builder
WORKDIR /app
COPY diplomacy/web/package.json .
COPY diplomacy/web/package-lock.json .
RUN npm install --force
COPY diplomacy/web/ /app
COPY diplomacy/maps/ /maps
# Needed to work around changes in OpenSSL 3.0
ENV NODE_OPTIONS=--openssl-legacy-provider
RUN npm run build
FROM python:3.7.17-alpine3.18 AS server
RUN apk upgrade --no-cache
WORKDIR /app
RUN pip install --no-cache-dir pip==24.0 \
&& pip uninstall --yes setuptools wheel
COPY requirements-lock.txt .
RUN pip install --no-cache-dir -r requirements-lock.txt
COPY diplomacy/ diplomacy/
COPY README.md .
COPY setup.cfg .
COPY setup.py .
RUN pip install --no-cache-dir .
COPY --from=app-builder /app/build /app/diplomacy/web/build
# Web UI
EXPOSE 80
# Agent API
EXPOSE 8433
# DAIDE server
EXPOSE 8434-8600
CMD ["sh", "-c", "python -m http.server 80 --directory diplomacy/web/build/ & python -m diplomacy.server.run"]
LABEL org.opencontainers.image.source=https://github.com/ALLAN-DIP/diplomacy