-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbase_node.dockerfile
More file actions
38 lines (29 loc) · 1.15 KB
/
base_node.dockerfile
File metadata and controls
38 lines (29 loc) · 1.15 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
FROM zauberzeug/nicegui:2.23.3
RUN apt-get update && \
apt-get install -y \
jpeginfo \
python3-pip \
libjpeg-dev \
curl \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
WORKDIR /app/
# delete everything in /app
RUN rm -rf /app/*
RUN python3 -m pip install --upgrade pip && \
python3 -m pip install uv
COPY pyproject.toml ./
COPY uv.lock ./
# Allow installing dev dependencies to run tests, can be disbaled by setting --build-arg INSTALL_DEV=false
ARG INSTALL_DEV=true
RUN echo "INSTALL_DEV is set to $INSTALL_DEV" && \
if [ "$INSTALL_DEV" = 'true' ]; then \
uv export --frozen --extra dev --format requirements.txt --no-emit-project -o /tmp/requirements.txt; \
else \
uv export --frozen --format requirements.txt --no-emit-project -o /tmp/requirements.txt; \
fi && \
uv pip install --system --requirement /tmp/requirements.txt && \
rm -f /tmp/requirements.txt
# while development this will be mounted but in deployment we need the latest code baked into the image
ADD ./learning_loop_node /usr/local/lib/python3.11/site-packages/learning_loop_node
# Overwrite the entrypoint to bash
ENTRYPOINT ["/bin/bash"]