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

Wyświetl plik

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