Dockerfile 963 B

12345678910111213141516171819202122232425262728
  1. # 0. set args
  2. ARG PPTAG=2.4.1 # tags refer to https://hub.docker.com/r/paddlepaddle/paddle/tags
  3. # 1. pull base image
  4. FROM paddlepaddle/paddle:${PPTAG}
  5. # 2. install GDAL
  6. RUN wget https://paddlers.bj.bcebos.com/dependencies/gdal/GDAL-3.4.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl \
  7. && pip install GDAL-3.4.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl \
  8. && rm -rf GDAL-3.4.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
  9. # 3. clone paddlers
  10. WORKDIR /opt
  11. RUN git clone https://github.com/PaddlePaddle/PaddleRS.git \
  12. && chmod 777 -R /opt/PaddleRS/examples
  13. ENV PYTHONPATH /opt/PaddleRS
  14. # 4. install requirements
  15. WORKDIR /opt/PaddleRS
  16. RUN pip install -r /opt/PaddleRS/requirements.txt -i https://mirror.baidu.com/pypi/simple
  17. # 5. install pydensecrf
  18. WORKDIR /usr/src
  19. RUN pip install git+https://github.com/lucasb-eyer/pydensecrf.git \
  20. && rm -rf /usr/src/pydensecrf
  21. # 6. finish
  22. WORKDIR /opt/PaddleRS