-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
43b26af
commit 03ff8f0
Showing
2 changed files
with
2 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,148 +1,5 @@ | ||
#----------------------------------------------------------------------------------------- | ||
# Build ilab-base container | ||
# gdal build: https://github.com/OSGeo/gdal/blob/master/gdal/docker/ubuntu-full/Dockerfile | ||
# https://github.com/nasa-nccs-hpda/core/blob/master/container/cisto-gdal-2.0.0.def | ||
#----------------------------------------------------------------------------------------- | ||
Bootstrap: docker | ||
# FROM: osgeo/gdal:ubuntu-full-latest | ||
# FROM: osgeo/gdal:ubuntu-full-3.4.0 | ||
FROM: osgeo/gdal:ubuntu-full-3.6.2 | ||
|
||
%labels | ||
gdal_maintainer Even Rouault <even.rouault@spatialys.com> | ||
cisto_author gtamkin | ||
cisto_modified sstrong | ||
Version v6.1.0 | ||
|
||
%help | ||
=========================================================================== | ||
- python3-data-science – contains the Python data science ecosystem: | ||
a. NumPy | ||
b. SciPy | ||
c. matplotlib | ||
d. IPython | ||
e. pandas | ||
f. Scikit-learn | ||
- V6 includes latest GDAl version 3.6.2. | ||
- v6.1.0 Included REDIS code that Caleb updated in the ilab-base-gdal-3.3.3-v5.def file. | ||
|
||
=========================================================================== | ||
|
||
%environment | ||
export PYTHONPATH="$PYTHONPATH:/usr/local/ilab" | ||
#1/7/22 - Replaced with correct python path | ||
#export PYTHONPATH="$PYTHONPATH:/usr/local/lib/python3.8/dist-packages" | ||
export PYTHONPATH="/usr/local/lib/python3.8/dist-packages" | ||
export REDIS_PORT="6379" | ||
|
||
%post | ||
|
||
PROJECT_PATH="/usr/local/ilab" | ||
REDIS_FILE="/etc/profile.d/redis_server.sh" | ||
mkdir -p $PROJECT_PATH | ||
|
||
#------------------------------------------------------------------------------- | ||
# Make NCCS specific links | ||
#------------------------------------------------------------------------------- | ||
#mkdir -p /att/nobackup /lscratch /att/gpfsfs/atrepo01 /att/pubrepo /css/nga/INDEX/current/nga_footprint.gdb | ||
#for i in $(seq 1 30); do | ||
# ln -s /gpfs/gsfs${i} /gs${i}; | ||
#done | ||
|
||
#------------------------------------------------------------------------------- | ||
# System Dependencies | ||
#------------------------------------------------------------------------------- | ||
apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y dist-upgrade && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ | ||
python3-pip python3-dev wget vim curl git procps gcc g++ bzip2 libssl-dev \ | ||
libsqlite3-dev libx11-dev libgeos++-dev libproj-dev | ||
DEBIAN_FRONTEND=noninteractive apt-get -y autoremove && \ | ||
rm -rf /var/lib/apt/lists/* && \ | ||
rm -rf /var/cache/apt | ||
|
||
#------------------------------------------------------------------------------- | ||
# Python Stack | ||
#------------------------------------------------------------------------------- | ||
python -m pip install --upgrade pip | ||
|
||
python -m pip install awscli s3fs | ||
python -m pip install celery[redis] | ||
python -m pip install certifi | ||
python -m pip install cryptography | ||
python -m pip install Cython | ||
python -m pip install dask | ||
python -m pip install decorator | ||
python -m pip install dill | ||
python -m pip install distributed | ||
python -m pip install docutils | ||
python -m pip install fiona | ||
python -m pip install flower | ||
python -m pip install geopandas | ||
python -m pip install h5py | ||
python -m pip install imageio | ||
python -m pip install ipykernel | ||
python -m pip install ipython | ||
python -m pip install ipython-genutils | ||
python -m pip install ipywidgets | ||
python -m pip install matplotlib | ||
python -m pip install netcdf4 | ||
python -m pip install networkx | ||
python -m pip install notebook | ||
python -m pip install numba | ||
python -m pip install numexpr | ||
python -m pip install numpy | ||
python -m pip install pandas | ||
python -m pip install pyhdf | ||
python -m pip install pyproj | ||
python -m pip install Pysal | ||
python -m pip install PyYAML | ||
python -m pip install rasterio | ||
python -m pip install redis | ||
python -m pip install requests | ||
python -m pip install rioxarray | ||
python -m pip install scikit-image | ||
python -m pip install scikit-learn | ||
python -m pip install scipy | ||
python -m pip install seaborn | ||
python -m pip install shapely | ||
python -m pip install cartopy | ||
python -m pip install xarray | ||
python -m pip install urllib3 | ||
python -m pip install zarr | ||
|
||
python -m pip cache purge | ||
|
||
# Add redis-server binary to /usr/local/bin | ||
export pyVer=`python --version | awk -F' ' '{print $2}' | awk -F'.' '{print $1"."$2}'` | ||
ln -sf /usr/local/lib/python${pyVer}/dist-packages/redis_server/bin/redis-server /usr/local/bin/redis-server | ||
|
||
# --------------- 2/16/23 Adding this from ilab-base-gdal-3.3.3-v5.def file | ||
|
||
# 3/11/22 modified by Caleb for verson 2.0.0 for testing of 2 lines below | ||
# 5/4/22 Testing passed. nepac and.. app containers also passed so making this ilab-base-3.3.3-v2 the new production version 2. | ||
# Setup redis-server daemon. Sets REDIS_PORT env variable for celery-based applications to reference the correct redis port at run-time. | ||
# echo "export REDIS_PORT=\"\$(python -c 'import socket; s = socket.socket(); s.bind((\"\", 0)); print(s.getsockname()[1]); s.close();')\"" > $REDIS_FILE | ||
echo "redis-server --daemonize yes --port \$REDIS_PORT" >> $REDIS_FILE; | ||
echo "export SINGULARITYENV_REDIS_PORTS=\$REDIS_PORT" >> $REDIS_FILE; | ||
chmod +x $REDIS_FILE; | ||
From: busybox:latest | ||
|
||
%runscript | ||
/bin/bash -c "source /etc/profile.d/redis_server.sh" | ||
exec "$@" | ||
/bin/bash -c "pkill redis-server" | ||
|
||
%startscript | ||
#/bin/bash -c "export REDIS_PORT=6379" | ||
exec /bin/bash -c "source /etc/profile.d/redis_server.sh" | ||
|
||
# -------------------------------------------------------------------------- | ||
|
||
%test | ||
|
||
cat /etc/os-release | grep 20 | ||
gdalinfo --formats | grep -i jpeg | ||
gdalinfo --formats | grep -i hdf | ||
ogrinfo --formats | grep GDB | ||
python -V | grep 3 | ||
python -c 'from osgeo import gdal; print(gdal.__version__)' | ||
|
||
echo "Hold me closer... tiny container :) :D" |
This file was deleted.
Oops, something went wrong.