diff --git a/Dockerfile b/Dockerfile index 4654a01..b3c02fe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -73,6 +73,9 @@ COPY --from=web-build /app/dist /root/static/ RUN for venv in /root/venvs/*/bin; do \ echo "export PATH=\"$venv:\$PATH\"" >> /etc/profile.d/sia.sh ; \ done +RUN for venv in /root/venvs/*/bin; do \ + echo "export PATH=\"$venv:\$PATH\"" > "/etc/profile.d/venv_$(basename "$(dirname "$venv")").sh" \ +done WORKDIR /root/desktop ENTRYPOINT ["/bin/bash", "-l", "-c"] diff --git a/scripts/install.sh b/scripts/install.sh index 5661ce3..d8dfd11 100644 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -3,11 +3,17 @@ echo "Installing ITB tool..." python3 -m venv "/root/venvs/itb" /root/venvs/itb/bin/pip install -e /root/sia/tools/itb/ +echo "export PATH=\"/root/venvs/itb/bin/:\$PATH\"" > "/etc/profile.d/venv_itb.sh" \ +source "/etc/profile.d/venv_itb.sh" echo "Installing Train tool..." python3 -m venv "/root/venvs/train" /root/venvs/train/bin/pip install -e /root/sia/tools/train/ +echo "export PATH=\"/root/venvs/train/bin/:\$PATH\"" > "/etc/profile.d/venv_train.sh" \ +source "/etc/profile.d/venv_train.sh" echo "Installing SIA core..." python3 -m venv "/root/venvs/sia" -/root/venvs/sia/bin/pip install -e /root/sia/ \ No newline at end of file +/root/venvs/sia/bin/pip install -e /root/sia/ +echo "export PATH=\"/root/venvs/sia/bin/:\$PATH\"" > "/etc/profile.d/venv_sia.sh" \ +source "/etc/profile.d/venv_sia.sh" \ No newline at end of file diff --git a/scripts/restart.sh b/scripts/restart.sh index 341a5a2..0534205 100644 --- a/scripts/restart.sh +++ b/scripts/restart.sh @@ -4,7 +4,7 @@ set -e cd "/root/desktop" while true; do - "/root/sia/scripts/init.sh" + "/root/sia/scripts/install.sh" sia EXIT_CODE=$? diff --git a/tools/train/bin/train b/tools/train/bin/train index 5a79b10..1fd21b7 100644 --- a/tools/train/bin/train +++ b/tools/train/bin/train @@ -12,4 +12,4 @@ fi mkdir -p "$OUTPUT_DIR" -python -m train.qwq "$@" \ No newline at end of file +/root/venvs/train/bin/python -m train.qwq "$@" \ No newline at end of file