Merge pull request #30 from snh/container-updates

Container: Use new predictor download method
pull/32/head
Mark Jessop 2021-04-06 18:02:21 +09:30 zatwierdzone przez GitHub
commit c0ab8ff251
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 13 dodań i 22 usunięć

Wyświetl plik

@ -8,19 +8,13 @@ RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y \
cmake \
libgdal-dev && \
libgeos-dev && \
rm -rf /var/lib/apt/lists/*
# Copy in requirements.txt.
COPY requirements.txt \
/root/chasemapper/requirements.txt
COPY requirements.txt /root/chasemapper/requirements.txt
# Install numpy Python package first so that it is available for gdal.
RUN pip3 --no-cache-dir install --user --no-warn-script-location \
--extra-index-url https://www.piwheels.org/simple \
numpy
# Install remaining Python packages.
# Install Python packages.
RUN pip3 --no-cache-dir install --user --no-warn-script-location \
--extra-index-url https://www.piwheels.org/simple \
-r /root/chasemapper/requirements.txt
@ -29,15 +23,13 @@ RUN pip3 --no-cache-dir install --user --no-warn-script-location \
COPY . /root/chasemapper
# Download and install cusf_predictor_wrapper, and build predictor binary.
ADD https://github.com/darksidelemm/cusf_predictor_wrapper/archive/master.zip /root/cusf_predictor_wrapper-master.zip
ADD https://github.com/darksidelemm/cusf_predictor_wrapper/archive/master.zip \
/root/cusf_predictor_wrapper-master.zip
RUN unzip /root/cusf_predictor_wrapper-master.zip -d /root && \
rm /root/cusf_predictor_wrapper-master.zip && \
cd /root/cusf_predictor_wrapper-master && \
python3 setup.py install --user && \
cd src && \
mkdir build && \
cd build && \
cmake ../ && \
mkdir -p /root/cusf_predictor_wrapper-master/src/build && \
cd /root/cusf_predictor_wrapper-master/src/build && \
cmake .. && \
make
# -------------------------
@ -50,7 +42,8 @@ EXPOSE 5001/tcp
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y \
libgdal20 \
libeccodes0 \
libgeos-c1v5 \
libglib2.0 \
tini && \
rm -rf /var/lib/apt/lists/*
@ -59,8 +52,8 @@ RUN apt-get update && \
COPY --from=build /root/.local /root/.local
# Copy predictor binary and get_wind_data.py from the build container.
COPY --from=build /root/cusf_predictor_wrapper-master/src/build/pred /opt/chasemapper/
COPY --from=build /root/cusf_predictor_wrapper-master/apps/get_wind_data.py /opt/chasemapper/
COPY --from=build /root/cusf_predictor_wrapper-master/src/build/pred \
/opt/chasemapper/
# Copy in chasemapper.
COPY . /opt/chasemapper

Wyświetl plik

@ -1,11 +1,9 @@
fastkml
cusfpredict
flask
flask-socketio
gdal==2.4.0 # Debian Buster has GDAL 2.4.0 packaged.
lxml
numpy
python-dateutil
pytz
requests
serial
shapely