<#3299 docker build: make sure venvs are owned by ...
# flyte-github
c
#3299 docker build: make sure venvs are owned by flytekit Pull request opened by cosmicBboy This PR optimizes docker image size by giving ownership of the micromamba python installation and virtual environments created during the image build process on the same layer that creates the virtual environment. This avoids layer duplication. Note: Setting
USER flytekit
before the python venv installation commands leads to various issues, e.g.
poetry
package installation doesn't work because the
flytekit
user doesn't seem to have certain necessary network access while
root
does. https://bito.ai#summarystart| ### Summary by Bito This pull request optimizes the Docker image build process by ensuring that virtual environments and micromamba Python installations are owned by the flytekit user, reducing image size and avoiding layer duplication. Adjustments to the Dockerfile commands address issues with running as a non-root user. flyteorg/flytekit