-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
executable file
·51 lines (38 loc) · 1.66 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
# Dockerfile for the Docker image that will be used to build the project
# Copyright (c) 2022 Juan Carlos Cedeño Noblecilla
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
# Written by Juan Carlos Cedeño Noblecilla.
# Arguments
ARG NVIDIA_RELEASE=21.07
ARG PYTHON_VERSION_FLAG=py3
ARG PLATFORM=tensorflow
ARG TF_VERSION_FLAG=tf2
ARG ESA_SNAP="esa-snap_sentinel_unix_8_0.sh"
ARG ESA_SNAP_URL="https://step.esa.int/downloads/8.0/installers/${ESA_SNAP}"
# Build an image from NVIDIA NGC (Repository for NVIDIA Optimized Frameworks)
# Release 20.09 is based on CUDA 11.4, which requires NVIDIA driver release 470 or later
# compatible with NVIDIA GPUs of CEDIA's HPC
FROM nvcr.io/nvidia/${PLATFORM}:${NVIDIA_RELEASE}-${TF_VERSION_FLAG}-${PYTHON_VERSION_FLAG}
# Set maintener
LABEL maintainer="Juan Carlos Cedeño <[email protected]>"
# Set project directory
WORKDIR /oil-spill-SAR
# Add PYTHONPATH
ENV PYTHONPATH="${PYTHONPATH}:$(pwd)"
# Copy requirements.txt to the container at work directory
COPY requirements.txt .
COPY esa-snap_install_unix_8_0.varfile .
# Update and install dependencies
RUN apt update -y && apt install --no-install-recommends gdal-bin libsqlite3-mod-spatialite -y
RUN wget -o ${ESA_SNAP} ${ESA_SNAP_URL} && chmod +x ${ESA_SNAP} && ./${ESA_SNAP} -q -varfile esa-snap_install_unix_8_0.varfile
# Install dependencies
RUN pip install -U pip
RUN pip install -r requirements.txt
RUN rm requirements.txt
# Install other dependencies such as linters. This is not necessary for the project
RUN pip install black
# Expose Tensorboard Port
EXPOSE 6006
# Expose Jupyter Port
EXPOSE 8888