mirror of
https://github.com/codex-storage/bittorrent-benchmarks.git
synced 2025-02-13 11:36:28 +00:00
25 lines
593 B
Docker
25 lines
593 B
Docker
FROM python:3.12-slim
|
|
|
|
ARG BUILD_TYPE="test"
|
|
|
|
RUN pip install poetry && poetry config virtualenvs.create false
|
|
|
|
RUN mkdir /opt/bittorrent-benchmarks
|
|
WORKDIR /opt/bittorrent-benchmarks
|
|
|
|
|
|
COPY pyproject.toml poetry.lock ./
|
|
RUN if [ "$BUILD_TYPE" = "production" ]; then \
|
|
echo "Image is a production build"; \
|
|
poetry install --only main --no-root; \
|
|
else \
|
|
echo "Image is a test build"; \
|
|
poetry install --no-root; \
|
|
fi
|
|
|
|
COPY . .
|
|
RUN poetry install --only main
|
|
|
|
ENTRYPOINT ["/usr/local/bin/bittorrent-benchmarks", "/opt/bittorrent-benchmarks/experiments.yaml"]
|
|
|