alessandro trinca tornidor commited on
Commit
7d75d30
1 Parent(s): 8c1771d

[fix] add scripts folder, update README.md

Browse files
Files changed (2) hide show
  1. Dockerfile +1 -0
  2. README.md +19 -0
Dockerfile CHANGED
@@ -154,6 +154,7 @@ WORKDIR ${LAMBDA_TASK_ROOT}
154
 
155
  COPY samgis_lisa_on_cuda ${LAMBDA_TASK_ROOT}/samgis_lisa_on_cuda
156
  COPY wrappers ${LAMBDA_TASK_ROOT}/wrappers
 
157
 
158
  RUN ls -l /usr/bin/which
159
  RUN /usr/bin/which python
 
154
 
155
  COPY samgis_lisa_on_cuda ${LAMBDA_TASK_ROOT}/samgis_lisa_on_cuda
156
  COPY wrappers ${LAMBDA_TASK_ROOT}/wrappers
157
+ COPY scripts ${LAMBDA_TASK_ROOT}/scripts
158
 
159
  RUN ls -l /usr/bin/which
160
  RUN /usr/bin/which python
README.md CHANGED
@@ -94,3 +94,22 @@ The static documentation it's now ready at the path `docs/_build/html/index.html
94
  To create a work in progress openapi json or yaml file use
95
  - `extract-openapi-fastapi.py`
96
  - `extract-openapi-lambda.py` (useful to export the json schema request and response from lambda app api)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
  To create a work in progress openapi json or yaml file use
95
  - `extract-openapi-fastapi.py`
96
  - `extract-openapi-lambda.py` (useful to export the json schema request and response from lambda app api)
97
+
98
+ ### Handle dynamic folder creation
99
+
100
+ it's possible to dynamically create a new support folder adding it to a json string env FOLDERS_MAP, e.g.:
101
+
102
+ ```json
103
+ {
104
+ "WORKDIR": "/var/task",
105
+ "XDG_CACHE_HOME": "/data",
106
+ "PROJECT_ROOT_FOLDER": "/data",
107
+ "MPLCONFIGDIR": "/data/.cache/matplotlib",
108
+ "TRANSFORMERS_CACHE": "/data/.cache/transformers",
109
+ "PYTORCH_KERNEL_CACHE_PATH": "/data/.cache/torch/kernels",
110
+ "FASTAPI_STATIC": "/var/task/static",
111
+ "VIS_OUTPUT": "/data/vis_output"
112
+ }
113
+ ```
114
+
115
+ The python script create_folders_and_variables_if_not_exists.py will read this env variable, removing any files that exists with these pathnames and assert the correct creation of all the folders. Also these folders must exist as env variables, so the script assert that an env variable exists with its path.