Skip to content

Commit

Permalink
add support for more pip dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsongraca committed Sep 20, 2024
1 parent 1c6727a commit 97727fb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ services:
PLUGIN_TMC1: /opt/kdock/data/repos/klipper_tmc_autotune/autotune_tmc.py
PLUGIN_TMC2: /opt/kdock/data/repos/klipper_tmc_autotune/motor_constants.py
PLUGIN_TMC3: /opt/kdock/data/repos/klipper_tmc_autotune/motor_database.cfg

EXTRA_DEPS: GitPython matplotlib numpy scipy PyWavelets
moonraker:
image: ghcr.io/nelsongraca/kdock-moonraker
depends_on:
Expand All @@ -36,4 +36,4 @@ services:
volumes:
- ./data/config/mainsail.json:/usr/share/nginx/html/config.json
ports:
- 8080:80
- 8080:80
5 changes: 5 additions & 0 deletions klipper/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ done

source ./.venv/bin/activate

#install extra dependencies if defined
if [ -n "$EXTRA_DEPS" ]; then
pip install $EXTRA_DEPS
fi

python klipper/klippy/klippy.py \
-a data/klipper.sock \
-l data/logs/klippy.log \
Expand Down
8 changes: 5 additions & 3 deletions moonraker/start.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

#!/bin/bash

#Link plugins from PLUGIN_ environment variables
Expand All @@ -8,10 +7,13 @@ for p in $(echo "${!PLUGIN_*}"); do
ln -sf "$pluginFile" ./moonraker/moonraker/components/$(basename "$pluginFile");
done



source ./.venv/bin/activate

#install extra dependencies if defined
if [ -n "$EXTRA_DEPS" ]; then
pip install $EXTRA_DEPS
fi

python moonraker/moonraker/moonraker.py \
-u ./data/moonraker.sock \
-d ./data

0 comments on commit 97727fb

Please sign in to comment.