Skip to content

Commit 03c90b2

Browse files
Merge pull request #14 from autmoate/dockerize
Dockerize: added dockerfile
2 parents c5e3fba + 07a636d commit 03c90b2

3 files changed

Lines changed: 55 additions & 0 deletions

File tree

.dockerignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.venv
2+
__pycache__
3+
*.pyc
4+
*.pyo
5+
*.pyd
6+
tests
7+
.git

Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM python:3.11-slim
2+
3+
ENV PYTHONDONTWRITEBYTECODE=1 \
4+
PYTHONUNBUFFERED=1
5+
6+
WORKDIR /app
7+
8+
RUN pip install --no-cache-dir uv
9+
10+
COPY . /app
11+
12+
RUN uv sync --no-dev
13+
14+
EXPOSE 5172
15+
16+
CMD ["sh", "-c", "cd examples/mnist && uv run vest data.csv --host 0.0.0.0 --port 5172 --image-path ./images"]
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
services:
2+
vest:
3+
image: python:3.11-slim
4+
working_dir: /workspace
5+
volumes:
6+
- ./:/workspace
7+
ports:
8+
- "5000:5000"
9+
command:
10+
- /bin/sh
11+
- -c
12+
- |
13+
python -m pip install --no-cache-dir vision-embedding-space-travelling==0.2.2 kagglehub &&
14+
python - <<'PY'
15+
import urllib.request
16+
17+
urllib.request.urlretrieve(
18+
"https://github.com/ScaDS/vest/raw/refs/heads/main/examples/butterflies/data.csv",
19+
"data.csv",
20+
)
21+
PY
22+
python - <<'PY'
23+
import os
24+
import kagglehub
25+
26+
os.makedirs("./images", exist_ok=True)
27+
path = kagglehub.dataset_download(
28+
"phucthaiv02/butterfly-image-classification", output_dir="./images"
29+
)
30+
print("Path to dataset files:", path)
31+
PY
32+
vest data.csv --image-path ./images --host 0.0.0.0 --port 5000 --no-debug

0 commit comments

Comments
 (0)