-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (28 loc) · 963 Bytes
/
Dockerfile
File metadata and controls
36 lines (28 loc) · 963 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Build: docker build -t fingr -f Dockerfile.ubuntu .
# Run: docker run -it --rm fingr:latest
FROM ubuntu:24.04
COPY --from=ghcr.io/astral-sh/uv:0.10@sha256:4cac394b6b72846f8a85a7a0e577c6d61d4e17fe2ccee65d9451a8b3c9efb4ac /uv /uvx /bin/
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
gcc \
g++ \
libgfortran5 \
libgomp1 \
cl-cffi \
&& apt-get upgrade -y \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
WORKDIR /app
RUN useradd --home-dir=/app fingr && chown -R fingr /app
USER fingr
COPY pyproject.toml uv.lock ./
# Install dependencies with uv
# UV_COMPILE_BYTECODE: Precompile Python files to .pyc for faster startup
ENV UV_COMPILE_BYTECODE=1 \
UV_LINK_MODE=copy \
UV_NO_DEV=1
RUN uv python install 3.14
RUN uv sync --locked --no-cache
COPY fingr.py ./
COPY fingr/ ./fingr/
EXPOSE 7979
ENTRYPOINT ["uv", "run", "--no-cache", "./fingr.py", "--verbose", "--host", "0.0.0.0"]