Fix: add --break-system-packages for PEP 668
This commit is contained in:
@@ -12,7 +12,7 @@ jobs:
|
|||||||
- name: Cài đặt Python và Pip
|
- name: Cài đặt Python và Pip
|
||||||
run: |
|
run: |
|
||||||
echo "✅ Người dùng hiện tại: $(whoami)"
|
echo "✅ Người dùng hiện tại: $(whoami)"
|
||||||
echo "✅ Cập nhật hệ thống và cài đặt pip (chạy dưới quyền root)..."
|
echo "✅ Cập nhật hệ thống và cài đặt pip..."
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install -y python3-pip
|
apt-get install -y python3-pip
|
||||||
python3 --version
|
python3 --version
|
||||||
@@ -20,10 +20,11 @@ jobs:
|
|||||||
|
|
||||||
- name: Cài đặt dependencies
|
- name: Cài đặt dependencies
|
||||||
run: |
|
run: |
|
||||||
python3 -m pip install --upgrade pip
|
echo "✅ Cài đặt dependencies (An toàn trong CI container)"
|
||||||
# Bỏ qua lỗi nếu không có file requirements.txt
|
python3 -m pip install --upgrade pip --break-system-packages
|
||||||
|
|
||||||
if [ -f requirements.txt ]; then
|
if [ -f requirements.txt ]; then
|
||||||
python3 -m pip install -r requirements.txt
|
python3 -m pip install -r requirements.txt --break-system-packages
|
||||||
else
|
else
|
||||||
echo "⚠️ Không tìm thấy requirements.txt, bỏ qua bước này."
|
echo "⚠️ Không tìm thấy requirements.txt, bỏ qua bước này."
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user