This repository was archived by the owner on Mar 19, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
47 lines (34 loc) · 1.35 KB
/
Dockerfile
File metadata and controls
47 lines (34 loc) · 1.35 KB
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
# syntax=docker/dockerfile:1
# This file passes all checks from Hadolint (https://github.com/hadolint/hadolint)
# Use the command `hadolint Dockerfile` to test
# Adding Hadolint to `pre-commit` is non-trivial, so the command must be run manually
FROM python:3.11.13-slim-bookworm AS base
# Allow bot to detect whether running in a container
# Using ID from https://www.freedesktop.org/software/systemd/man/257/systemd-detect-virt.html
ENV VIRT=docker
WORKDIR /bot
RUN apt-get -y update \
&& apt-get -y upgrade \
&& apt-get --no-install-recommends -y install git=1:2.39.* \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN pip install --no-cache-dir --upgrade pip==25.1.1 \
&& pip uninstall --yes setuptools wheel
# Install required packages
COPY baseline-models/ baseline-models/
COPY baseline-models/diplomacy/ diplomacy/
COPY requirements-lock.txt .
COPY pyproject.toml .
ARG TARGET
RUN pip install --no-cache-dir -e .[$TARGET] -c requirements-lock.txt
# Copy remaining files
COPY LICENSE .
COPY README.md .
COPY src/ src/
# Re-install so `pip` stores all metadata properly
RUN pip install --no-cache-dir --no-deps -e .[$TARGET]
# Script executors
ENTRYPOINT ["python", "-m", "chiron_utils.scripts.run_bot"]
LABEL org.opencontainers.image.source=https://github.com/ALLAN-DIP/chiron-utils
FROM base AS baseline-lr
COPY lr_model/ lr_model/