File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,4 +3,5 @@ FROM amazonlinux:2023
33RUN yum -y update && \
44yum -y install \
55python3.14 \
6+ rsync \
67zip
Original file line number Diff line number Diff line change 11python3.14 -m venv python
2- source python/bin/activate
2+ source / python/bin/activate
33
4- pip3 install -r requirements.txt -t python/lib/python* /site-packages
4+ pip install --upgrade pip
5+ pip install -r requirements.txt -t /python/lib/python* /site-packages
56
7+ mkdir /tmp/python
8+ rsync -av --exclude=pip* /python/lib/python* /site-packages/* /tmp/python
9+ cd tmp/
610zip -r9 python_layer.zip python
Original file line number Diff line number Diff line change @@ -6,6 +6,6 @@ docker run -td --name=$container_name $docker_image
66docker cp ./requirements.txt $container_name :/
77
88docker exec -i $container_name /bin/bash < ./docker_install.sh
9- docker cp $container_name :/python_layer.zip python_layer.zip
9+ docker cp $container_name :/tmp/ python_layer.zip python_layer.zip
1010docker stop $container_name
1111docker rm $container_name
Original file line number Diff line number Diff line change @@ -6,6 +6,6 @@ podman run -td --name=$container_name $podman_image
66podman cp ./requirements.txt $container_name :/
77
88podman exec -i $container_name /bin/bash < ./docker_install.sh
9- podman cp $container_name :/python_layer.zip python_layer.zip
9+ podman cp $container_name :/tmp/ python_layer.zip python_layer.zip
1010podman stop $container_name
1111podman rm $container_name
You can’t perform that action at this time.
0 commit comments