-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (24 loc) · 785 Bytes
/
Copy pathDockerfile
File metadata and controls
30 lines (24 loc) · 785 Bytes
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
FROM python:3.8.12-bullseye
LABEL maintainer="youssef_harby@yahoo.com"
RUN mkdir /usr/src/app
WORKDIR /usr/src/app
COPY ./requirements.txt .
# Keeps Python from generating .pyc files in the container
ENV PYTHONDONTWRITEBYTECODE=1
# Turns off buffering for easier container logging
ENV PYTHONUNBUFFERED=1
RUN apt-get update \
&& apt-get install -y libgomp1 \
ffmpeg libsm6 libxext6 \
git \
build-essential \
gdal-bin libgdal-dev
RUN export CPLUS_INCLUDE_PATH=/usr/include/gdal
RUN export C_INCLUDE_PATH=/usr/include/gdal
RUN pip install --upgrade pip
RUN pip install GDAL==3.2.2 --no-cache-dir
RUN pip install -r requirements.txt
# Set environment variables
ENV FLASK_APP=run.py
# Run
ENTRYPOINT [ "flask", "run", "--host=0.0.0.0" ]