-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.cuda-tf
More file actions
34 lines (26 loc) · 1016 Bytes
/
Dockerfile.cuda-tf
File metadata and controls
34 lines (26 loc) · 1016 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
# TensorFlow official GPU image with CUDA 12, CuDNN, and Python 3.10 pre-configured
FROM tensorflow/tensorflow:latest-gpu
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential libgl1-mesa-glx libglib2.0-0 inkscape && \
apt-get clean && rm -rf /var/lib/apt/lists/*
# Set Python 3.10 as default (TensorFlow base already has Python)
ENV PYTHONUNBUFFERED=1
ENV PIP_NO_CACHE_DIR=1
ENV PATH="/opt/venv/bin:$PATH"
ENV UV_PROJECT_ENVIRONMENT=/opt/venv
ENV UV_PYTHON_PREFERENCE=only-system
WORKDIR /app
COPY . /app
RUN mkdir -p /home/appuser/.data/DECIMER-V2
# Install uv and dependencies
RUN pip install --upgrade pip uv
RUN uv sync --no-dev --no-editable --no-cache
WORKDIR /app
# Run server as non-root user, consistent with CPU image layout.
RUN adduser --disabled-password --gecos '' appuser \
&& chown -R appuser:appuser /app \
&& chown -R appuser:appuser /home/appuser/.data
USER appuser
ENV HOME=/home/appuser
EXPOSE 8099
ENTRYPOINT ["python", "decimer_server.py"]