-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (21 loc) · 958 Bytes
/
Dockerfile
File metadata and controls
27 lines (21 loc) · 958 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
FROM ollama/ollama:latest
# Install python and necessary build dependencies
RUN apt-get update && apt-get install -y python3 python3-pip python3-venv git libre2-dev
# Create a virtual environment and install symparse
RUN python3 -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
# Copy working directory and install Symparse + Demo module
WORKDIR /opt/symparse
COPY . .
RUN pip3 install --no-cache-dir .[demo] portalocker setuptools wheel pybind11
# Install without build isolation to use system libre2
RUN CFLAGS="-I$(python -c 'import pybind11; print(pybind11.get_include())')" pip install google-re2==1.0.0 --no-build-isolation
# Script to start ollama, pull gemma3:1b, and wait for tail -f ready state
RUN echo '#!/bin/bash\n\
ollama serve &\n\
sleep 5\n\
ollama pull gemma3:1b\n\
echo "Ready! You can now pipe logs into symparse."\n\
tail -f /dev/null' > /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]