diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..431b668 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,13 @@ +# Project +build/ +dist/ + +*.sqlite3 + +# Tools +.ruff_cache/ + +# Python +.venv/ +__pycache__/ +*.egg-info/ diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b54c388 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM python:3.12-slim + +COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/ + +WORKDIR /app + +ADD . /app + +ENV PATH="/app/.venv/bin:$PATH" + +RUN uv sync --locked + +EXPOSE 8080 + +CMD uv run espminer-optim diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..1f3cd2d --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,13 @@ +services: + + dashboard: + image: espminer-optim:latest + build: + context: . + dockerfile: Dockerfile + container_name: espminer-optim-dashboard + volumes: + - .:/app/ + ports: + - 8080:8080 + command: uv run optuna-dashboard sqlite:///espminer-optim-db.sqlite3