mirror of
https://github.com/codex-storage/bittorrent-benchmarks.git
synced 2025-02-15 12:36:31 +00:00
add Dockerfile and run script
This commit is contained in:
parent
176b9b3f0e
commit
3a319aa823
@ -60,6 +60,10 @@ def _init_logging():
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
def main():
|
||||||
_init_logging()
|
_init_logging()
|
||||||
app()
|
app()
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
||||||
|
15
docker/bittorrent-benchmarks.Dockerfile
Normal file
15
docker/bittorrent-benchmarks.Dockerfile
Normal 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"]
|
||||||
|
|
@ -1,11 +1,10 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "bittorrent-benchmarks"
|
name = "benchmarks"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
description = "Harness for benchmarking Codex against BitTorrent."
|
description = "Harness for benchmarking Codex against BitTorrent."
|
||||||
authors = ["Your Name <you@example.com>"]
|
authors = ["Your Name <you@example.com>"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
package-mode = false
|
|
||||||
|
|
||||||
[tool.poetry.dependencies]
|
[tool.poetry.dependencies]
|
||||||
python = "^3.12"
|
python = "^3.12"
|
||||||
@ -32,3 +31,6 @@ ignore_missing_imports = true
|
|||||||
[build-system]
|
[build-system]
|
||||||
requires = ["poetry-core"]
|
requires = ["poetry-core"]
|
||||||
build-backend = "poetry.core.masonry.api"
|
build-backend = "poetry.core.masonry.api"
|
||||||
|
|
||||||
|
[tool.poetry.scripts]
|
||||||
|
bittorrent-benchmarks = "benchmarks.cli:main"
|
Loading…
x
Reference in New Issue
Block a user