forked from hotosm/fAIr-utilities
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
65 lines (47 loc) · 2.1 KB
/
Dockerfile
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
FROM tensorflow/tensorflow:2.9.2-gpu-jupyter
RUN apt-get update && apt-get install -y python3-opencv
RUN add-apt-repository ppa:ubuntugis/ppa && apt-get update
RUN apt-get update
RUN apt-get install -y gdal-bin
RUN apt-get install -y libgdal-dev
ENV CPLUS_INCLUDE_PATH=/usr/include/gdal
ENV C_INCLUDE_PATH=/usr/include/gdal
#install numpy before gdal
RUN pip install numpy==1.23.5
# pip install dependencies.
RUN pip install --global-option=build_ext --global-option="-I/usr/include/gdal" GDAL==`gdal-config --version`
COPY docker/ramp/docker-requirements.txt docker-requirements.txt
RUN pip install -r docker-requirements.txt
# Install ultralytics for YOLO, FastSAM, etc. together with pytorch and other dependencies
# For exact pytorch+cuda versions, see https://pytorch.org/get-started/previous-versions/
RUN pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cu113
RUN pip install ultralytics==8.1.6
# pip install solaris -- try with tmp-free build
# COPY docker/ramp/solaris /tmp/solaris
COPY docker/solaris/solaris /tmp/solaris/solaris
COPY docker/solaris/requirements.txt /tmp/solaris/requirements.txt
COPY docker/solaris/setup.py /tmp/solaris/setup.py
RUN pip install /tmp/solaris --use-feature=in-tree-build
RUN pip install scikit-fmm --use-feature=in-tree-build
RUN pip install setuptools --upgrade
ENV RAMP_HOME=/tf
# Install the package in development mode
COPY setup.py ./setup.py
COPY hot_fair_utilities ./hot_fair_utilities
RUN pip install -e .
# install ramp-fair
RUN pip install ramp-fair mercantile pandas==1.5.3
## Copy Sample data
COPY ramp-data ./ramp-data
# Prepare ramp-code
RUN git clone --depth 1 https://github.com/kshitijrajsharma/ramp-code-fAIr.git ramp-code
# install gdown
RUN pip install gdown
# Download Basemodel
RUN gdown --fuzzy https://drive.google.com/file/d/1YQsY61S_rGfJ_f6kLQq4ouYE2l3iRe1k/view?usp=sharing
# Unzip and Move Basemodel
RUN unzip checkpoint.tf.zip -d ramp-code/ramp
# Copy test_app.py
COPY test_app.py ./test_app.py
COPY test_yolo.py ./test_yolo.py
COPY Package_Test.ipynb ./Package_Test.ipynb