Skip to content

Commit 32dd762

Browse files
committed
feat: Use poetry for CAS
1 parent 0000130 commit 32dd762

File tree

7 files changed

+180
-49
lines changed

7 files changed

+180
-49
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/python
3+
{
4+
"name": "Python 3",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "mcr.microsoft.com/devcontainers/python:1-3.12-bookworm",
7+
"customizations": {
8+
"vscode": {
9+
"extensions": [
10+
"ms-python.debugpy",
11+
"ms-python.python",
12+
"ms-python.vscode-pylance"
13+
]
14+
}
15+
},
16+
17+
// Features to add to the dev container. More info: https://containers.dev/features.
18+
// "features": {},
19+
20+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
21+
// "forwardPorts": [],
22+
23+
// Use 'postCreateCommand' to run commands after the container is created.
24+
"postCreateCommand": "pip install --upgrade pip && pip install poetry"
25+
26+
// Configure tool-specific properties.
27+
// "customizations": {},
28+
29+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
30+
// "remoteUser": "root"
31+
}

docker/cas/Containerfile

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
FROM python:3.13-alpine
2+
3+
RUN apk --no-cache add \
4+
# funani dependencies
5+
file \
6+
# Pillow dependencies
7+
freetype \
8+
fribidi \
9+
harfbuzz \
10+
jpeg \
11+
lcms2 \
12+
openjpeg \
13+
tcl \
14+
tiff \
15+
tk \
16+
zlib
17+
18+
RUN pip install --upgrade pip && \
19+
pip install poetry
20+
21+
COPY pyproject.toml poetry.* ./
22+
RUN poetry install
23+
24+
RUN mkdir -p /data
25+
26+
WORKDIR /code
27+
28+
COPY src .
29+
30+
ENV PATH=/root/.local:$PATH
31+
32+
ENTRYPOINT [ "python", "./funani.py" ]
33+
CMD ["--help"]

docker/cas/Dockerfile

Lines changed: 0 additions & 48 deletions
This file was deleted.

docker/cas/poetry.lock

Lines changed: 95 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docker/cas/poetry.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[virtualenvs]
2+
create = false

docker/cas/pyproject.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[project]
2+
name = "cas"
3+
version = "0.1.0"
4+
description = ""
5+
authors = [
6+
{name = "Jaap de Haan",email = "jaap.dehaan@alpsalpine.com"}
7+
]
8+
requires-python = ">=3.12"
9+
dependencies = [
10+
"pillow (==11.1.0)"
11+
]
12+
13+
14+
[build-system]
15+
requires = ["poetry-core>=2.0.0,<3.0.0"]
16+
build-backend = "poetry.core.masonry.api"
17+
18+
[tool.poetry]
19+
package-mode = false

docker/cas/requirements.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)