Skip to content

Commit a62a300

Browse files
committed
Ensure pipenv uses the system Python instead of a venv
The default behavior of pipenv is to create a virtual environment to use for installing dependencies. Our configuration does not leverage this venv since we are simply using pipenv to manage dependencies and need all dependencies installed into the Lambda's task root directory. This default behavior can create issues with our configuration because if one of the core packages seeded into that venv (pip, setuptools, or wheel) is the same version as a dependency in the lockfile then it will not be installed into the Lambda's task root directory for later use..
1 parent 2a44cdc commit a62a300

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ COPY src/py$PY_VERSION/ .
2323
#
2424
# The --extra-pip-args option is used to pass necessary arguments to the
2525
# underlying pip calls.
26-
RUN pipenv sync --extra-pip-args="--no-cache-dir --target ${LAMBDA_TASK_ROOT}"
26+
RUN pipenv sync --system --extra-pip-args="--no-cache-dir --target ${LAMBDA_TASK_ROOT}"
2727

2828
FROM amazon/aws-lambda-python:$PY_VERSION as build-stage
2929

0 commit comments

Comments
 (0)