Skip to content

Commit 401f87f

Browse files
authored
Merge pull request IQuOD#212 from IQuOD/install-path
new install scripts
2 parents 8e0222c + 02041c3 commit 401f87f

File tree

5 files changed

+83
-91
lines changed

5 files changed

+83
-91
lines changed

.travis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services:
66
- docker
77

88
before_install:
9-
- docker pull iquod/autoqc
9+
- docker image pull iquod/autoqc:ubuntu-16.04
1010

1111
script:
12-
- docker run -v $PWD:/AutoQC_latest iquod/autoqc /bin/bash -c "cp /AutoQC/data/* /AutoQC_latest/data/.; cd /AutoQC_latest; nosetests tests/*.py"
12+
- docker container run -v $PWD:/AutoQC_latest iquod/autoqc:ubuntu-16.04 bash -c "cp /AutoQC/data/* /AutoQC_latest/data/.; cd /AutoQC_latest; /usr/local/bin/nosetests tests/*.py"

Dockerfile

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM ubuntu:16.04
2+
3+
# configure environment for install
4+
RUN apt-get update
5+
RUN apt-get install -y git
6+
7+
# install AutoQC and all deps
8+
RUN git clone https://github.com/IQuOD/AutoQC
9+
WORKDIR /AutoQC
10+
RUN sed -i -e 's/sudo //g' install.sh
11+
RUN chmod 777 install.sh
12+
RUN ./install.sh
13+
14+
# set default environment variables
15+
ENV OCEANSDB_DIR /AutoQC/data/

README.md

+16-49
Original file line numberDiff line numberDiff line change
@@ -13,62 +13,29 @@ The IQuOD proposal is to set up an open quality control benchmarking system. Wo
1313

1414
## Dependencies & Setup:
1515

16-
The easiest way to set up AutoQC is via [Docker](https://www.docker.com/); install Docker per their website, and then grab the autoqc image:
16+
### Local Install
1717

18-
```
19-
docker pull iquod/autoqc
20-
```
21-
22-
Start the image via
18+
**Tested on Ubuntu 16.04**
2319

24-
```
25-
docker run --sysctl "kernel.shmmax=18446744073692774399" -v $PWD:/rawdata -i -t iquod/autoqc /bin/bash
26-
```
20+
To clone this project and set it up, make sure `git` is installed, then:
2721

28-
And you'll find AutoQC all set up and ready to use in the directory `/AutoQC`. Note that the version of AutoQC that ships with the docker image may be behind master on GitHub; you can always do `git pull origin master` from the `/AutoQC` directory inside the container, if you need an update. Also, whatever directory you launched this command from will be mounted on `/rawdata` inside your Docker container; use this to bring data into the container, or copy logs and files from within the container to this location to access them after Docker exits.
22+
```
23+
$ git clone https://github.com/IQuOD/AutoQC
24+
$ cd AutoQC
25+
$ source install.sh
26+
```
2927

30-
If you want to run AutoQC without Docker, have a look at the setup steps in `docker/Dockerfile`; these correspond to the same setup steps you'll need to do on a similar machine (i.e. on Debian with miniconda already installed).
28+
### Containerized Install
3129

32-
Docker makes it very convenient for the project to run AutoQC, but note that the data files to run the full set of AutoQC checks are obtained as detailed below:
30+
To run AutoQC in a containerized environment, make sure `docker` is installed, then:
3331

34-
- EN_bgcheck_info.nc (http://www.metoffice.gov.uk/hadobs/en4) from http://www.metoffice.gov.uk/hadobs/en4/data/EN_bgcheck_info.nc;
35-
- temperature_seasonal_5deg.nc (https://www.nodc.noaa.gov/OC5/indprod.html) from http://data.nodc.noaa.gov/thredds/fileServer/woa/WOA09/NetCDFdata/temperature_seasonal_5deg.nc;
36-
- etopo5.nc (http://www.ngdc.noaa.gov/mgg/global/etopo5.HTML) from http://oos.soest.hawaii.edu/thredds/ncss/etopo5?var=ROSE&disableLLSubset=on&disableProjSubset=on&horizStride=1&addLatLon=true;
37-
- climatological_t_median_and_amd_for_aqc.nc: based on climatological_t_median_and_amd_for_aqc.dat provided by Viktor Gouretski, Integrated Climate Data Center, University of Hamburg, Hamburg, Germany, February 2016.
38-
- Seasonal WOA13 files:
39-
- [all](http://data.nodc.noaa.gov/thredds/fileServer/woa/WOA13/DATAv2/temperature/netcdf/decav/5deg/woa13_decav_t13_5dv2.nc)
40-
- [four](http://data.nodc.noaa.gov/thredds/fileServer/woa/WOA13/DATAv2/temperature/netcdf/decav/5deg/woa13_decav_t14_5dv2.nc)
41-
- [of](http://data.nodc.noaa.gov/thredds/fileServer/woa/WOA13/DATAv2/temperature/netcdf/decav/5deg/woa13_decav_t15_5dv2.nc)
42-
- [these](http://data.nodc.noaa.gov/thredds/fileServer/woa/WOA13/DATAv2/temperature/netcdf/decav/5deg/woa13_decav_t16_5dv2.nc)
32+
```
33+
$ docker image run -it -v /my/data/directory:/rawdata iquod/autoqc:ubuntu-16.04 bash
34+
```
4335

44-
### AutoQC on AWS
45-
46-
Docker makes running AutoQC on the cloud very easy. Once you've set up your Amazon Web Services account, launch an EC2 instance and do:
47-
48-
```
49-
sudo yum update -y
50-
sudo yum install -y docker
51-
sudo service docker start
52-
sudo docker pull iquod/autoqc
53-
```
54-
55-
Next we need to add data to our instance; after uploading your files to an S3 bucket called `autoqc`, do:
56-
57-
```
58-
aws configure
59-
(fill in permissions fields)
60-
mkdir data
61-
aws s3 sync s3://autoqc data
62-
cd data
63-
```
64-
65-
Finally, launch your docker image with the `data` directory mounted inside it at `/rawdata`:
66-
67-
```
68-
sudo docker run --sysctl "kernel.shmmax=18446744073692774399" -v $PWD:/rawdata -i -t iquod/autoqc /bin/bash
69-
```
36+
Anything in `/my/daya/directory` on your machine will be available at `/rawdata` inside the container, and vice versa. Use this to add raw WOD-ASCII data to your container, and add multiple `-v origin:destination` paths to include multiple directories in the same way.
7037

71-
And once again, AutoQC will be all set up in `/AutoQC`. Remember to `git pull` if necessary, and add any external data or parameter files to the correct places.
38+
You may also want to `git pull origin master` inside the `/AutoQC` directory inside your container, to fetch the latest version of the project.
7239

7340
## Usage
7441

@@ -105,7 +72,7 @@ Additionally, there is a column in the table for the qc results of every test fo
10572
python AutoQC.py tablename nProcessors
10673
```
10774

108-
where `tablename` is the postgres table to pull profiles from (probably the same as `tablename` in the last step), and `nProcessors` is how many processors you'd like to parallelize over
75+
where `tablename` is the postgres table to pull profiles from (probably the same as `tablename` in the last step), and `nProcessors` is how many processors you'd like to parallelize over.
10976

11077
### Result Summary
11178

docker/Dockerfile

-40
This file was deleted.

install.sh

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# install and configure environment for AutoQC
2+
# from inside AutoQC, run `bash install.sh`
3+
4+
# install apt-get packages
5+
sudo apt-get update -y
6+
sudo apt-get install -y nano bzip2 wget unzip \
7+
python2.7=2.7.12-1ubuntu0~16.04.3 \
8+
python-pip \
9+
libhdf5-serial-dev=1.8.16+docs-4ubuntu1 \
10+
libnetcdf-dev=1:4.4.0-2 \
11+
python-dev=2.7.12-1~16.04 \
12+
libgl1-mesa-glx=18.0.5-0ubuntu0~16.04.1 \
13+
python-qt4=4.11.4+dfsg-1build4 \
14+
python-tk=2.7.12-1~16.04
15+
16+
# install python packages
17+
pip install Shapely==1.6.2 \
18+
netCDF4==1.3.1 \
19+
matplotlib==2.1.1 \
20+
pyproj==1.9.5.1 \
21+
pandas==0.21.1 \
22+
scipy==0.18.0 \
23+
numpy==1.11.1 \
24+
mkl==2018.0.3
25+
pip install seabird==0.8.0 \
26+
gsw==3.0.3 \
27+
scikit-fuzzy==0.3 \
28+
oceansdb==0.6.0 \
29+
cotede==0.18.0 \
30+
wodpy==1.5.0
31+
32+
# Add AutoQC parameter files
33+
cd data
34+
wget http://www.metoffice.gov.uk/hadobs/en4/data/EN_bgcheck_info.nc
35+
wget http://data.nodc.noaa.gov/thredds/fileServer/woa/WOA09/NetCDFdata/temperature_seasonal_5deg.nc
36+
wget "http://oos.soest.hawaii.edu/thredds/ncss/etopo5?var=ROSE&disableLLSubset=on&disableProjSubset=on&horizStride=1&addLatLon=true" -O etopo5.nc
37+
wget http://data.nodc.noaa.gov/thredds/fileServer/woa/WOA13/DATAv2/temperature/netcdf/decav/5deg/woa13_decav_t13_5dv2.nc
38+
wget http://data.nodc.noaa.gov/thredds/fileServer/woa/WOA13/DATAv2/temperature/netcdf/decav/5deg/woa13_decav_t14_5dv2.nc
39+
wget http://data.nodc.noaa.gov/thredds/fileServer/woa/WOA13/DATAv2/temperature/netcdf/decav/5deg/woa13_decav_t15_5dv2.nc
40+
wget http://data.nodc.noaa.gov/thredds/fileServer/woa/WOA13/DATAv2/temperature/netcdf/decav/5deg/woa13_decav_t16_5dv2.nc
41+
wget https://data.nodc.noaa.gov/thredds/fileServer/woa/WOA13/DATAv2/salinity/netcdf/decav/5deg/woa13_decav_s13_5dv2.nc
42+
wget https://data.nodc.noaa.gov/thredds/fileServer/woa/WOA13/DATAv2/salinity/netcdf/decav/5deg/woa13_decav_s14_5dv2.nc
43+
wget https://data.nodc.noaa.gov/thredds/fileServer/woa/WOA13/DATAv2/salinity/netcdf/decav/5deg/woa13_decav_s15_5dv2.nc
44+
wget https://data.nodc.noaa.gov/thredds/fileServer/woa/WOA13/DATAv2/salinity/netcdf/decav/5deg/woa13_decav_s16_5dv2.nc
45+
wget ftp://ftp.aoml.noaa.gov/phod/pub/bringas/XBT/AQC/AOML_AQC_2018/data_center/woa13_00_025.nc
46+
wget https://s3-us-west-2.amazonaws.com/autoqc/climatological_t_median_and_amd_for_aqc.nc
47+
cd ..
48+
49+
export OCEANSDB_DIR=$PWD/data/
50+
echo export 'OCEANSDB_DIR='$PWD'/data/' >> $HOME/.bashrc

0 commit comments

Comments
 (0)