add Dockerfile and run script

This commit is contained in:
gmega 2024-12-01 23:12:49 -03:00
parent 176b9b3f0e
commit 3a319aa823
No known key found for this signature in database
GPG Key ID: 6290D34EAD824B18
3 changed files with 24 additions and 3 deletions

View File

@ -60,6 +60,10 @@ def _init_logging():
)
if __name__ == '__main__':
def main():
_init_logging()
app()
if __name__ == '__main__':
main()

View File

@ -0,0 +1,15 @@
FROM python:3.12-slim
RUN pip install poetry && poetry config virtualenvs.create false
RUN mkdir /opt/bittorrent-benchmarks
WORKDIR /opt/bittorrent-benchmarks
COPY pyproject.toml poetry.lock ./
RUN poetry install --no-root
COPY . .
RUN poetry install
ENTRYPOINT ["/usr/local/bin/bittorrent-benchmarks", "run", "/opt/bittorrent-benchmarks/experiments.yaml"]

View File

@ -1,11 +1,10 @@
[tool.poetry]
name = "bittorrent-benchmarks"
name = "benchmarks"
version = "0.1.0"
description = "Harness for benchmarking Codex against BitTorrent."
authors = ["Your Name <you@example.com>"]
license = "MIT"
readme = "README.md"
package-mode = false
[tool.poetry.dependencies]
python = "^3.12"
@ -32,3 +31,6 @@ ignore_missing_imports = true
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.scripts]
bittorrent-benchmarks = "benchmarks.cli:main"