forked from freeleaps/freeleaps-pub
Merged PR 40: Update for add arm64 as default arch when auto detect os arch
Update for add arm64 as default arch when auto detect os arch
This commit is contained in:
commit
387a96d08f
@ -867,6 +867,12 @@ docker exec -i "$DEVBOX_NAME" bash <<EOF
|
|||||||
./start_webapi.sh > /home/devbox/logs/backend.logs 2>&1 &
|
./start_webapi.sh > /home/devbox/logs/backend.logs 2>&1 &
|
||||||
else
|
else
|
||||||
echo "==> [BACKEND] Backend dependencies already installed. Skipping installation."
|
echo "==> [BACKEND] Backend dependencies already installed. Skipping installation."
|
||||||
|
# Check if all dependencies are installed, if not, install them
|
||||||
|
if ! pip check; then
|
||||||
|
echo "==> [BACKEND] Some dependencies are missing. Reinstalling..."
|
||||||
|
pip install -r /home/devbox/freeleaps/apps/requirements.txt
|
||||||
|
fi
|
||||||
|
|
||||||
# Check if the backend service is already running
|
# Check if the backend service is already running
|
||||||
SERVICE_API_ACCESS_PORT=\$(cat /home/devbox/.devbox-backend-port)
|
SERVICE_API_ACCESS_PORT=\$(cat /home/devbox/.devbox-backend-port)
|
||||||
uvicorn freeleaps.webapi.main:app --reload --host 0.0.0.0 --port \$SERVICE_API_ACCESS_PORT > /home/devbox/logs/backend.logs 2>&1 &
|
uvicorn freeleaps.webapi.main:app --reload --host 0.0.0.0 --port \$SERVICE_API_ACCESS_PORT > /home/devbox/logs/backend.logs 2>&1 &
|
||||||
@ -2629,7 +2635,7 @@ devbox_init_parse_requirements() {
|
|||||||
detected_arch=$(uname -m)
|
detected_arch=$(uname -m)
|
||||||
if [ "$detected_arch" = "x86_64" ]; then
|
if [ "$detected_arch" = "x86_64" ]; then
|
||||||
current_arch="amd64"
|
current_arch="amd64"
|
||||||
elif [ "$detected_arch" = "aarch64" ]; then
|
elif [ "$detected_arch" = "aarch64" ] || [ "$detected_arch" = "arm64" ] ; then
|
||||||
current_arch="arm64"
|
current_arch="arm64"
|
||||||
else
|
else
|
||||||
echo "ERROR: Unsupported architecture detected: $detected_arch"
|
echo "ERROR: Unsupported architecture detected: $detected_arch"
|
||||||
@ -2639,6 +2645,7 @@ devbox_init_parse_requirements() {
|
|||||||
add_arg '--arch' "$current_arch"
|
add_arg '--arch' "$current_arch"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [ -z "$(get_arg '--devbox-container-name')" ]; then
|
if [ -z "$(get_arg '--devbox-container-name')" ]; then
|
||||||
add_arg '--devbox-container-name' "devbox"
|
add_arg '--devbox-container-name' "devbox"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user