mirror of
https://github.com/codex-storage/bittorrent-benchmarks.git
synced 2025-01-23 17:38:59 +00:00
23 lines
566 B
Docker
23 lines
566 B
Docker
FROM python:3.12-slim
|
|
|
|
ARG BUILD_TYPE="test"
|
|
|
|
RUN pip install poetry
|
|
|
|
RUN mkdir /opt/bittorrent-benchmarks
|
|
WORKDIR /opt/bittorrent-benchmarks
|
|
|
|
COPY pyproject.toml poetry.lock ./
|
|
RUN if [ "$BUILD_TYPE" = "release" ]; then \
|
|
echo "Image is a release build"; \
|
|
poetry install --without dev --no-root; \
|
|
else \
|
|
echo "Image is a test build"; \
|
|
poetry install --no-root; \
|
|
fi
|
|
|
|
COPY . .
|
|
RUN poetry install --only main
|
|
|
|
ENTRYPOINT ["poetry", "run", "bittorrent-benchmarks", "experiments", "/opt/bittorrent-benchmarks/experiments.k8s.yaml"]
|