docker-compose.yaml

This commit is contained in:
hpayer committed 2026-10-08 15:15:39 -04:00
1 parent d5da086e66
commit b7b1e38b4e
8 files changed
+3224 -2579

No files matched your search

+17 -2571
View File
File diff suppressed because it is too large. Load diff
-7
View File
@@ -18,15 +18,8 @@ dependencies = [
"fastapi (>=0.142.3,<0.143.0)",
"scikit-learn (>=1.9.1,<2.0.0)",
"uvicorn (>=0.54.0,<0.55.0)",
# "jupyterlab (>=4.6.4,<5.0.0)",
# "matplotlib (>=3.11.2,<4.0.0)",
]
[tool.poetry.group.dev.dependencies]
jupyterlab = "^4.6.4"
matplotlib = "^3.11.2"
[tool.poetry]
package-mode = false
+22
View File
@@ -0,0 +1,22 @@
services:
museum_analytics_app:
build:
context: ./api
dockerfile: Dockerfile
ports:
- "8000:8000"
volumes:
- ./api:/app
jupyter_notebook:
build:
context: ./notebooks
dockerfile: Dockerfile
ports:
- "8888:8888"
environment:
- FASTAPI_URL=http://localhost:8000
depends_on:
- museum_analytics_app
volumes:
- ./notebooks:/home/jovyan/work
+26
View File
@@ -0,0 +1,26 @@
FROM python:3.12-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
POETRY_VIRTUALENVS_CREATE=false \
POETRY_NO_INTERACTION=1 \
POETRY_REQUESTS_TIMEOUT=120 \
POETRY_INSTALLER_MAX_WORKERS=4
WORKDIR /workspace
RUN pip install --no-cache-dir poetry
COPY pyproject.toml poetry.lock ./
RUN --mount=type=cache,target=/root/.cache/pypoetry \
poetry install --only main --no-root --no-ansi
COPY pyproject.toml poetry.lock* /workspace/
RUN poetry install --no-root
COPY . /workspace
EXPOSE 8888
CMD ["jupyter", "lab", "--ip=0.0.0.0", "--port=8888", "--no-browser", "--allow-root", "--NotebookApp.token=''"]
+3134
View File
File diff suppressed because it is too large. Load diff
+3
View File
@@ -0,0 +1,3 @@
[virtualenvs]
in-project = true
+21
View File
@@ -0,0 +1,21 @@
[project]
name = "notebooks"
version = "0.1.0"
description = ""
authors = [
{name = "hansp",email = "hanspayer@gmail.com"}
]
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"jupyterlab (>=4.6.4,<5.0.0)",
"matplotlib (>=3.11.2,<4.0.0)",
"requests (>=2.34.2,<3.0.0)",
"numpy (>=2.5.3,<3.0.0)",
"pandas (>=3.0.6,<4.0.0)"
]
[build-system]
requires = ["poetry-core>=2.0.0,<3.0.0"]
build-backend = "poetry.core.masonry.api"
@@ -9,7 +9,7 @@
"\n",
"This notebook talks to the `museum_api` FastAPI server over HTTP: it starts the server (or uses one you already run), sends it the data, and plots the regression it returns.\n",
"\n",
"**Setup:** put `../api/app/museum_api.py` next to this notebook, then `pip install scikit-learn pandas fastapi uvicorn requests matplotlib`."
"**Setup:** put `../../api/app/museum_api.py` next to this notebook, then `pip install scikit-learn pandas fastapi uvicorn requests matplotlib`."
]
},
{