-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (27 loc) · 926 Bytes
/
Dockerfile
File metadata and controls
40 lines (27 loc) · 926 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
37
38
39
40
FROM python:3.11-slim
RUN apt-get update && apt-get install -y \
curl git unzip build-essential libgmp-dev \
jq \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# copy JUST the kimina server so the image can be cached during rebuilds
COPY kimina-lean-server ./kimina-lean-server
# Set environment variable for the wrapper
ENV KIMINA_HOST=http://localhost:12332
# Go into actual Kimina server directory
WORKDIR /app/kimina-lean-server
# Install Lean via elan
RUN curl https://elan.lean-lang.org/elan-init.sh -sSf | sh -s -- -y
# Add Lean tools to PATH
ENV PATH="/root/.elan/bin:$PATH"
# Copy env template
RUN cp .env.template .env
# Install dependencies
RUN pip install -e .
# Setup Lean env
RUN bash setup.sh
# copy the rest of the Lean server wrapper code
# Set working directory back to /app/lean-server before copying the wrapper
WORKDIR /app
COPY wrapper_server ./wrapper_server
# ~6min for first run