forked from Equim-chan/Mortal
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
42 lines (31 loc) · 731 Bytes
/
Dockerfile
File metadata and controls
42 lines (31 loc) · 731 Bytes
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
# syntax=docker/dockerfile:1.4-labs
FROM archlinux:base-devel as libriichi_build
RUN <<EOF
pacman -Syu --noconfirm --needed rust python
pacman -Scc
EOF
WORKDIR /
COPY Cargo.toml Cargo.lock .
COPY libriichi libriichi
RUN cargo build -p libriichi --lib --release
# -----
FROM archlinux:base
RUN <<EOF
pacman -Syu --noconfirm --needed python python-pytorch python-toml python-tqdm tensorboard
pacman -Scc
EOF
WORKDIR /mortal
COPY mortal .
COPY --from=libriichi_build /target/release/libriichi.so .
ENV MORTAL_CFG config.toml
COPY <<'EOF' config.toml
[control]
state_file = '/mnt/mortal.pth'
[resnet]
conv_channels = 192
num_blocks = 40
enable_bn = true
bn_momentum = 0.99
EOF
VOLUME /mnt
ENTRYPOINT ["python", "mortal.py"]