klipper: restructure build stage and add requirements

This commit is contained in:
Markus Küffner
2024-03-23 14:09:33 +01:00
parent f6f16be8fb
commit e5616ed8a4
2 changed files with 13 additions and 5 deletions

View File

@@ -2,19 +2,25 @@
##
FROM python:3.12-bookworm as build
ARG REPO=https://github.com/Klipper3d/klipper
ARG VERSION=master
RUN apt update \
&& apt install -y cmake \
&& apt clean
WORKDIR /opt
COPY additional_requirements.txt .
RUN python -m venv venv \
&& venv/bin/pip install -r additional_requirements.txt
ARG REPO=https://github.com/Klipper3d/klipper
ARG VERSION=master
RUN git clone ${REPO} klipper \
&& cd klipper \
&& git checkout ${VERSION} \
&& rm -rf .git
RUN python -m venv venv \
&& venv/bin/pip install -r klipper/scripts/klippy-requirements.txt \
&& venv/bin/pip install numpy==1.26.4 \
RUN venv/bin/pip install -r klipper/scripts/klippy-requirements.txt \
&& venv/bin/python -m compileall klipper/klippy \
&& venv/bin/python klipper/klippy/chelper/__init__.py
###

View File

@@ -0,0 +1,2 @@
#cmake==3.28.4; platform.machine == 'armv7l'
numpy==1.26.4