Spaces:
Sleeping
Sleeping
Update build.sh
Browse files
build.sh
CHANGED
|
@@ -1,18 +1,30 @@
|
|
| 1 |
#!/bin/bash
|
| 2 |
-
set -e
|
| 3 |
|
| 4 |
# Update package list
|
| 5 |
sudo apt update
|
| 6 |
|
| 7 |
-
#
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
# Install
|
| 11 |
-
sudo apt install -y
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
sudo apt install -y
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
#!/bin/bash
|
|
|
|
| 2 |
|
| 3 |
# Update package list
|
| 4 |
sudo apt update
|
| 5 |
|
| 6 |
+
# Install GDAL and its development files
|
| 7 |
+
sudo apt install -y gdal-bin libgdal-dev
|
| 8 |
+
|
| 9 |
+
# Install Python3 development files
|
| 10 |
+
sudo apt install -y python3-dev
|
| 11 |
+
|
| 12 |
+
# Install GDAL Python bindings
|
| 13 |
+
sudo apt install -y python3-gdal
|
| 14 |
+
|
| 15 |
+
# Get GDAL version
|
| 16 |
+
GDAL_VERSION=$(gdal-config --version)
|
| 17 |
+
|
| 18 |
+
# Install GDAL for pip with the matching version
|
| 19 |
+
pip install GDAL
|
| 20 |
+
|
| 21 |
+
# Create a Python script to test the installation
|
| 22 |
+
cat << EOF > test_osgeo.py
|
| 23 |
+
import osgeo
|
| 24 |
+
print(f"OSGEO version: {osgeo.__version__}")
|
| 25 |
+
EOF
|
| 26 |
+
|
| 27 |
+
# Run the test script
|
| 28 |
+
python3 test_osgeo.py
|
| 29 |
+
|
| 30 |
+
echo "Installation complete. If you see the OSGEO version above, the installation was successful."
|