fix: add python symlink, use absolute python env path when running backends (#5664)

* fix: add python symlink, use absolute python env path when running backends

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* fix(ci): do not push images when building PRs

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

---------

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
Ettore Di Giacinto 2025-06-16 23:00:53 +02:00 committed by GitHub
parent de343700fd
commit 89040ff6f7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 7 deletions

View file

@ -223,7 +223,7 @@ jobs:
password: ${{ secrets.dockerPassword }} password: ${{ secrets.dockerPassword }}
- name: Login to DockerHub - name: Login to DockerHub
# if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
registry: quay.io registry: quay.io
@ -282,7 +282,7 @@ jobs:
file: ./Dockerfile file: ./Dockerfile
cache-from: type=gha cache-from: type=gha
platforms: ${{ inputs.platforms }} platforms: ${{ inputs.platforms }}
push: true #push: true
tags: ${{ steps.meta_pull_request.outputs.tags }} tags: ${{ steps.meta_pull_request.outputs.tags }}
labels: ${{ steps.meta_pull_request.outputs.labels }} labels: ${{ steps.meta_pull_request.outputs.labels }}
## End testing image ## End testing image

View file

@ -23,7 +23,7 @@ RUN apt-get update && \
curl libssl-dev \ curl libssl-dev \
git \ git \
git-lfs \ git-lfs \
unzip upx-ucl python3 && \ unzip upx-ucl python3 python-is-python3 && \
apt-get clean && \ apt-get clean && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*

View file

@ -176,13 +176,13 @@ function startBackend() {
ensureVenv ensureVenv
if [ ! -z ${BACKEND_FILE} ]; then if [ ! -z ${BACKEND_FILE} ]; then
exec python ${BACKEND_FILE} $@ exec ${EDIR}/venv/bin/python ${BACKEND_FILE} $@
elif [ -e "${MY_DIR}/server.py" ]; then elif [ -e "${MY_DIR}/server.py" ]; then
exec python ${MY_DIR}/server.py $@ exec ${EDIR}/venv/bin/python ${MY_DIR}/server.py $@
elif [ -e "${MY_DIR}/backend.py" ]; then elif [ -e "${MY_DIR}/backend.py" ]; then
exec python ${MY_DIR}/backend.py $@ exec ${EDIR}/venv/bin/python ${MY_DIR}/backend.py $@
elif [ -e "${MY_DIR}/${BACKEND_NAME}.py" ]; then elif [ -e "${MY_DIR}/${BACKEND_NAME}.py" ]; then
exec python ${MY_DIR}/${BACKEND_NAME}.py $@ exec ${EDIR}/venv/bin/python ${MY_DIR}/${BACKEND_NAME}.py $@
fi fi
} }