Skip to content

Commit 1836b03

Browse files
committed
update and add Dockerfile
1 parent dc51888 commit 1836b03

File tree

3 files changed

+335
-243
lines changed

3 files changed

+335
-243
lines changed

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
python 3.12.2
1+
python 3.13.2

Dockerfile

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
FROM python:3.13.2-alpine3.21 AS requirements
2+
3+
RUN pip install poetry-plugin-export
4+
5+
WORKDIR /de-denker
6+
7+
COPY pyproject.toml poetry.lock ./
8+
9+
RUN poetry export --without-hashes --format=requirements.txt > requirements.txt
10+
11+
FROM python:3.13.2-alpine3.21 AS build
12+
13+
ENV PYTHONDONTWRITEBYTECODE=1
14+
15+
WORKDIR /de-denker
16+
17+
RUN apk add build-base
18+
19+
COPY --from=requirements /de-denker/requirements.txt .
20+
21+
RUN pip install -r requirements.txt
22+
23+
FROM python:3.13.2-alpine3.21
24+
25+
COPY --from=build /usr/local/lib/python3.13/site-packages /usr/local/lib/python3.13/site-packages
26+
COPY --from=build /usr/local/bin /usr/local/bin
27+
28+
COPY config.py main.py models.py static_probabilities.py telraam_api.py ./
29+
30+
CMD ["python", "main.py"]

0 commit comments

Comments
 (0)