-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
55 lines (44 loc) · 1.39 KB
/
Copy pathDockerfile
File metadata and controls
55 lines (44 loc) · 1.39 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
# Lambda SAT Middleware - Docker Container
# Provides a complete environment with Kissat, drat-trim, and Python middleware
FROM python:3.11-slim
# Install build dependencies
RUN apt-get update && apt-get install -y \
build-essential \
git \
wget \
&& rm -rf /var/lib/apt/lists/*
# Create app directory
WORKDIR /app
# Build and install Kissat
RUN cd /tmp && \
git clone https://github.com/arminbiere/kissat.git && \
cd kissat && \
./configure && \
make && \
cp build/kissat /usr/local/bin/ && \
cd / && rm -rf /tmp/kissat
# Build and install drat-trim
RUN cd /tmp && \
git clone https://github.com/marijnheule/drat-trim.git && \
cd drat-trim && \
make && \
cp drat-trim /usr/local/bin/ && \
cd / && rm -rf /tmp/drat-trim
# Verify installations
RUN kissat --version
RUN drat-trim --help || true
# Copy Python backend
COPY backend /app/backend
COPY backend/requirements.txt /app/requirements.txt
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy examples
COPY examples /app/examples
# Create non-root user
RUN useradd -m -u 1000 satuser && \
chown -R satuser:satuser /app
USER satuser
# Default command: run the test suite (headless library + CLI image).
# Override to solve, e.g.:
# docker run --rm IMAGE python -m backend.cli examples/simple_sat.cnf
CMD ["python", "-m", "pytest", "backend/tests/", "-q"]