From bc191a32c8424e9e468249836540aa77c94e9c41 Mon Sep 17 00:00:00 2001 From: SecretMineDE Date: Fri, 9 Feb 2024 16:49:45 +0100 Subject: [PATCH] fix: add venv --- fritz_temp_sync/Dockerfile | 7 ++++++- fritz_temp_sync/run.sh | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/fritz_temp_sync/Dockerfile b/fritz_temp_sync/Dockerfile index 9d58d8c..0edecfc 100755 --- a/fritz_temp_sync/Dockerfile +++ b/fritz_temp_sync/Dockerfile @@ -3,7 +3,12 @@ FROM $BUILD_FROM # Install requirements for add-on RUN apk update && apk add --no-cache python3 py-pip -RUN python3 -m pip install websockets requests beautifulsoup4 + +# Prepare venv +RUN python3 -m venv venv + +RUN source ./venv/bin/activate && \ + python3 -m pip install websockets requests beautifulsoup4 WORKDIR /data diff --git a/fritz_temp_sync/run.sh b/fritz_temp_sync/run.sh index c40f1aa..5a76f1c 100755 --- a/fritz_temp_sync/run.sh +++ b/fritz_temp_sync/run.sh @@ -1,3 +1,4 @@ #!/usr/bin/with-contenv bashio +source ./venv/bin/activate python3 /srv/sync_ha_fb.py /data/options.json \ No newline at end of file