-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfileAWS
26 lines (19 loc) · 1.05 KB
/
DockerfileAWS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
FROM ubuntu:16.04
RUN apt-get update
RUN apt-get install -y zip git ca-certificates s3cmd
RUN apt-get install -y libboost-all-dev libboost-doc libarmadillo-dev libarmadillo6
RUN apt-get install -y python3 python3-pip python3-dev build-essential
RUN apt-get install -y libgeos-dev libgdal-dev
RUN apt-get install -y python3-gdal gdal-bin
RUN pip3 install cython==0.28.5 matplotlib==2.2.2 fiona==1.8.0 pysal==1.14.4 geopandas==0.4.0 psycopg2==2.6.2 pandas==0.23.4 scipy==1.1.0 pyproj==1.9.5.1 descartes
RUN git clone https://github.com/JamesSaxon/C4.git && cd C4 && python3 setup.py build_ext --inplace
RUN touch ~/.netrc
ENV AWS_DEFAULT_REGION=us-east-1 \
AWS_ACCESS_KEY_ID=MY_AWS_ACCESS_KEY_ID \
AWS_SECRET_ACCESS_KEY=MY_AWS_SECRET_ACCESS_KEY
CMD cd C4 && \
echo RUNNING :: $STATE $SEED $METHOD && \
./run_iter.sh 2>&1 | tee ${STATE}-${SEED}-${METHOD}.out && \
zip -r $(printf "%s_s%03d%s.zip" $STATE $SEED $([ "$METHOD" != "" ] && echo _$METHOD)) \
${STATE}-${SEED}-${METHOD}.out res/ && \
s3cmd put *zip s3://jsaxon-test-bucket/