Repository navigation
Expand file tree
/
Copy pathDockerfile
More file actions
88 lines (78 loc) · 1.96 KB
/
Copy pathDockerfile
File metadata and controls
88 lines (78 loc) · 1.96 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# Use Python 3.11 slim image as base
FROM python:3.11-slim
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PYTHONPATH=/app \
MPLBACKEND=Agg \
PLOT2LLM_LOG_LEVEL=INFO
# Set work directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
gcc \
g++ \
gfortran \
libopenblas-dev \
liblapack-dev \
libatlas-base-dev \
libhdf5-dev \
libnetcdf-dev \
libgdal-dev \
libgeos-dev \
libproj-dev \
libspatialindex-dev \
libffi-dev \
libssl-dev \
libxml2-dev \
libxslt-dev \
libjpeg-dev \
libpng-dev \
libfreetype6-dev \
libtiff-dev \
libwebp-dev \
libopenjp2-7-dev \
liblcms2-dev \
libharfbuzz-dev \
libfribidi-dev \
libxcb1-dev \
libxrandr-dev \
libxss-dev \
libgconf-2-4 \
libasound2-dev \
libgtk-3-dev \
libnotify-dev \
libgstreamer1.0-dev \
libgstreamer-plugins-base1.0-dev \
libgstreamer-plugins-bad1.0-dev \
gstreamer1.0-plugins-base \
gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-ugly \
gstreamer1.0-libav \
gstreamer1.0-tools \
gstreamer1.0-x \
gstreamer1.0-alsa \
gstreamer1.0-gl \
gstreamer1.0-gtk3 \
gstreamer1.0-qt5 \
gstreamer1.0-pulseaudio \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# Install plot2llm with all optional dependencies
RUN pip install --no-cache-dir plot2llm[all]
# Copy project
COPY . .
# Install plot2llm in development mode
RUN pip install -e .
# Create non-root user
RUN useradd --create-home --shell /bin/bash plot2llm && \
chown -R plot2llm:plot2llm /app
USER plot2llm
# Expose port (if needed for web interface)
EXPOSE 8000
# Set default command
CMD ["python", "-c", "import plot2llm; print('Plot2LLM is ready!')"]