mirror of
https://github.com/qmk/qmk_cli.git
synced 2026-07-25 16:42:55 -04:00
Global install of QMK bootstrap distribution. (#216)
This commit is contained in:
@@ -33,9 +33,6 @@ jobs:
|
||||
matrix:
|
||||
os: [macos-latest, ubuntu-latest]
|
||||
python-version: ['3.9', '3.10', '3.11', '3.12']
|
||||
include:
|
||||
- os: macos-13
|
||||
python-version: '3.9'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
+17
-10
@@ -4,25 +4,32 @@ FROM ghcr.io/qmk/qmk_base_container:latest as builder
|
||||
ADD dist /tmp/dist
|
||||
|
||||
# Install QMK CLI via bootstrap script
|
||||
ARG TARGETPLATFORM
|
||||
RUN /bin/bash -c "curl -fsSL https://install.qmk.fm | sh -s -- --confirm"
|
||||
RUN mkdir -p /opt/uv/bin \
|
||||
&& export UV_PYTHON_INSTALL_DIR=/opt/uv/bin \
|
||||
&& /bin/bash -c "curl -fsSL https://install.qmk.fm | sh -s -- --confirm --uv-install-dir=/usr/local/bin --uv-tool-dir=/opt/uv/tools --qmk-distrib-dir=/opt/qmk"
|
||||
|
||||
# Do the equivalent of entering the virtual environment
|
||||
ENV PATH=/home/qmk/.local/share/uv/tools/qmk/bin:/home/qmk/.local/bin:$PATH \
|
||||
VIRTUAL_ENV=/home/qmk/.local/share/uv/tools/qmk
|
||||
ENV PATH=/opt/qmk/bin:/opt/uv/tools/qmk/bin:/usr/local/bin:$PATH \
|
||||
VIRTUAL_ENV=/opt/uv/tools/qmk
|
||||
|
||||
# Install python packages
|
||||
RUN python3 -m pip uninstall -y qmk || true
|
||||
RUN python3 -m pip install --upgrade pip setuptools wheel nose2 && \
|
||||
python3 -m pip install /tmp/dist/qmk-*.whl
|
||||
|
||||
# Allow the uv-installed python to be usable by others
|
||||
RUN chmod -R go=u,go-w /opt/uv /opt/qmk
|
||||
|
||||
# 2nd stage so we don't have /tmp/dist in the final image
|
||||
FROM ghcr.io/qmk/qmk_base_container:latest
|
||||
|
||||
# Do the equivalent of entering the virtual environment
|
||||
ENV PATH=/home/qmk/.local/share/uv/tools/qmk/bin:/home/qmk/.local/bin:$PATH \
|
||||
VIRTUAL_ENV=/home/qmk/.local/share/uv/tools/qmk
|
||||
COPY --from=builder /opt/uv /opt/uv
|
||||
COPY --from=builder /opt/qmk /opt/qmk
|
||||
|
||||
# Do the equivalent of entering the virtual environment
|
||||
ENV PATH=/opt/qmk/bin:/opt/uv/tools/qmk/bin:$PATH \
|
||||
VIRTUAL_ENV=/opt/uv/tools/qmk \
|
||||
QMK_DISTRIB_DIR=/opt/qmk \
|
||||
QMK_HOME=/qmk_firmware \
|
||||
QMK_USERSPACE=/qmk_userspace
|
||||
|
||||
ARG TARGETPLATFORM
|
||||
COPY --from=builder /home/qmk /home/qmk
|
||||
COPY --from=builder /usr/lib/udev/rules.d/50-qmk.rules /usr/lib/udev/rules.d/50-qmk.rules
|
||||
|
||||
Reference in New Issue
Block a user