-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi.Dockerfile
More file actions
27 lines (16 loc) · 754 Bytes
/
Copy pathapi.Dockerfile
File metadata and controls
27 lines (16 loc) · 754 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
FROM python:3.12
RUN apt-get update &&\
apt-get install -y libgdal-dev gdal-bin
RUN gdal-config --version
WORKDIR /code
COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
COPY ./scripts /code/scripts
COPY ./data /code/data
RUN wget -P ./data https://storage.googleapis.com/off-grid-440012.appspot.com/data/ncat-10.tif
RUN wget -P ./data https://storage.googleapis.com/off-grid-440012.appspot.com/data/ski_routes_mask.tif
COPY ./src/off_grid /code/src/off_grid
ENV PORT=8000
CMD exec fastapi run src/off_grid/main.py --port $PORT
# If running behind a proxy like Nginx or Traefik add --proxy-headers
# CMD ["fastapi", "run", "app/main.py", "--port", "80", "--proxy-headers"]