Skip to content

Commit 7abe085

Browse files
authored
Example Fix: python dependencies from layers (#447)
1 parent c29a554 commit 7abe085

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
#!/bin/bash
22

3-
PATH=$PATH:$LAMBDA_TASK_ROOT/bin PYTHONPATH=$LAMBDA_TASK_ROOT exec python -m uvicorn --port=$PORT main:app
3+
PATH=$PATH:$LAMBDA_TASK_ROOT/bin \
4+
PYTHONPATH=$LAMBDA_TASK_ROOT:$PYTHONPATH:/opt/python \
5+
exec python -m uvicorn --port=$PORT main:app

examples/fastapi-zip/app/run.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
#!/bin/bash
22

3-
PATH=$PATH:$LAMBDA_TASK_ROOT/bin PYTHONPATH=$LAMBDA_TASK_ROOT exec python -m uvicorn --port=$PORT main:app
3+
PATH=$PATH:$LAMBDA_TASK_ROOT/bin \
4+
PYTHONPATH=$LAMBDA_TASK_ROOT:$PYTHONPATH:/opt/python \
5+
exec python -m uvicorn --port=$PORT main:app

examples/flask-zip/app/run.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
#!/bin/bash
22

3-
PATH=$PATH:$LAMBDA_TASK_ROOT/bin PYTHONPATH=$LAMBDA_TASK_ROOT exec python -m gunicorn -b=:$PORT -w=1 app:app
3+
PATH=$PATH:$LAMBDA_TASK_ROOT/bin \
4+
PYTHONPATH=$LAMBDA_TASK_ROOT:$PYTHONPATH:/opt/python \
5+
exec python -m gunicorn -b=:$PORT -w=1 app:app

0 commit comments

Comments
 (0)