kopia lustrzana https://github.com/OpenDroneMap/WebODM
ubuntugis repository for gdal 2.1 dependency, gdal version check in start.sh
rodzic
a108640fcb
commit
bec65c4780
|
@ -18,6 +18,7 @@ RUN git submodule init
|
|||
RUN git submodule update
|
||||
|
||||
# Install Node.js + other packages
|
||||
RUN add-apt-repository ppa:ubuntugis/ubuntugis-unstable && apt-get update
|
||||
RUN curl --silent --location https://deb.nodesource.com/setup_6.x | bash -
|
||||
RUN apt-get install -y nodejs binutils libproj-dev gdal-bin
|
||||
|
||||
|
|
18
start.sh
18
start.sh
|
@ -9,17 +9,31 @@ echo "|__/|__/\___/_.___/\____/_____/_/ /_/ "
|
|||
echo
|
||||
echo -e "\e[39m"
|
||||
|
||||
python -c "import sys;ret = 1 if sys.version_info <= (3, 0) else 0;print('Checking python version... ' + ('3.x, good!' if ret == 0 else '2.x'));sys.exit(ret);"
|
||||
if [ $? -eq 1 ]; then
|
||||
almost_there(){
|
||||
echo
|
||||
echo "===================="
|
||||
echo "You're almost there!"
|
||||
echo "===================="
|
||||
}
|
||||
|
||||
# Check python version
|
||||
python -c "import sys;ret = 1 if sys.version_info <= (3, 0) else 0;print('Checking python version... ' + ('3.x, good!' if ret == 0 else '2.x'));sys.exit(ret);"
|
||||
if [ $? -eq 1 ]; then
|
||||
almost_there
|
||||
echo -e "\e[33mYour system is currently using Python 2.x. You need to install or configure your system to use Python 3.x. Check out http://docs.python-guide.org/en/latest/dev/virtualenvs/ for information on how to setup Python 3.x alongside your Python 2.x install.\e[39m"
|
||||
echo
|
||||
exit
|
||||
fi
|
||||
|
||||
# Check GDAL version
|
||||
python -c "import sys;import re;import subprocess;version = subprocess.Popen([\"gdalinfo\", \"--version\"], stdout=subprocess.PIPE).communicate()[0].decode().rstrip();ret = 0 if re.compile('^GDAL [2-9]\.[1-9]+').match(version) else 1; print('Checking GDAL version... ' + ('{}, excellent!'.format(version) if ret == 0 else version));sys.exit(ret);"
|
||||
if [ $? -eq 1 ]; then
|
||||
almost_there
|
||||
echo -e "\e[33mYour system is currently using a version of GDAL that is too old, or GDAL is not installed. You need to install or configure your system to use GDAL 2.1 or higher. If you have installed multiple versions of GDAL, make sure the newer one takes priority in your PATH environment variable.\e[39m"
|
||||
echo
|
||||
exit
|
||||
fi
|
||||
|
||||
echo Building asssets...
|
||||
webpack
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue