alessandro trinca tornidor
commited on
Commit
•
1ac44c5
1
Parent(s):
86f85c7
[feat] try, again, add using XDG_CACHE_HOME as parent for FASTAPI_STATIC ARG/ENV variable
Browse files- Dockerfile +2 -1
- samgis/utilities/constants.py +0 -1
- scripts/entrypoint.sh +2 -2
Dockerfile
CHANGED
@@ -1,7 +1,8 @@
|
|
1 |
# Include global ARGs at the dockerfile top
|
2 |
ARG ARCH="x86_64"
|
3 |
ARG LAMBDA_TASK_ROOT="/var/task"
|
4 |
-
ARG
|
|
|
5 |
ARG PYTHONPATH="${LAMBDA_TASK_ROOT}:${PYTHONPATH}:/usr/local/lib/python3/dist-packages"
|
6 |
ARG POETRY_NO_INTERACTION=1
|
7 |
ARG POETRY_VIRTUALENVS_IN_PROJECT=1
|
|
|
1 |
# Include global ARGs at the dockerfile top
|
2 |
ARG ARCH="x86_64"
|
3 |
ARG LAMBDA_TASK_ROOT="/var/task"
|
4 |
+
ARG XDG_CACHE_HOME="/data"
|
5 |
+
ARG FASTAPI_STATIC="${XDG_CACHE_HOME}/static"
|
6 |
ARG PYTHONPATH="${LAMBDA_TASK_ROOT}:${PYTHONPATH}:/usr/local/lib/python3/dist-packages"
|
7 |
ARG POETRY_NO_INTERACTION=1
|
8 |
ARG POETRY_VIRTUALENVS_IN_PROJECT=1
|
samgis/utilities/constants.py
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
INPUT_CRS_STRING = "EPSG:4326"
|
3 |
OUTPUT_CRS_STRING = "EPSG:3857"
|
4 |
DRIVER_RASTERIO_GTIFF = "GTiff"
|
5 |
-
ROOT = "/tmp"
|
6 |
CUSTOM_RESPONSE_MESSAGES = {
|
7 |
200: "ok",
|
8 |
400: "Bad Request",
|
|
|
2 |
INPUT_CRS_STRING = "EPSG:4326"
|
3 |
OUTPUT_CRS_STRING = "EPSG:3857"
|
4 |
DRIVER_RASTERIO_GTIFF = "GTiff"
|
|
|
5 |
CUSTOM_RESPONSE_MESSAGES = {
|
6 |
200: "ok",
|
7 |
400: "Bad Request",
|
scripts/entrypoint.sh
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
WORKDIR="/var/task"
|
4 |
XDG_CACHE_HOME="/data"
|
5 |
-
|
6 |
MPLCONFIGDIR=${XDG_CACHE_HOME}/.cache/matplotlib
|
7 |
TRANSFORMERS_CACHE=${XDG_CACHE_HOME}/.cache/transformers
|
8 |
FASTAPI_STATIC=${XDG_CACHE_HOME}/static
|
@@ -28,7 +28,7 @@ export MPLCONFIGDIR
|
|
28 |
export TRANSFORMERS_CACHE
|
29 |
export FASTAPI_STATIC
|
30 |
export VIS_OUTPUT
|
31 |
-
export
|
32 |
|
33 |
source ${WORKDIR}/venv/bin/activate
|
34 |
|
|
|
2 |
|
3 |
WORKDIR="/var/task"
|
4 |
XDG_CACHE_HOME="/data"
|
5 |
+
PROJECT_ROOT_FOLDER=${XDG_CACHE_HOME}
|
6 |
MPLCONFIGDIR=${XDG_CACHE_HOME}/.cache/matplotlib
|
7 |
TRANSFORMERS_CACHE=${XDG_CACHE_HOME}/.cache/transformers
|
8 |
FASTAPI_STATIC=${XDG_CACHE_HOME}/static
|
|
|
28 |
export TRANSFORMERS_CACHE
|
29 |
export FASTAPI_STATIC
|
30 |
export VIS_OUTPUT
|
31 |
+
export PROJECT_ROOT_FOLDER
|
32 |
|
33 |
source ${WORKDIR}/venv/bin/activate
|
34 |
|