File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -46,11 +46,14 @@ COPY pyproject.toml uv.lock ./
4646# Install only project dependencies, as this is cached until pyproject.toml uv.lock are updated.
4747RUN uv sync --locked --no-default-groups --no-install-project
4848
49- # Copy in source files. README is required for the package to build.
49+ # Copy in source files.
50+ # README.md is required for the package to build. It can be ommited for non-package applications.
5051COPY README.md ./
5152COPY src src
5253
5354# Install the rest of the application into the virtual environment.
55+ # Omit this step if your project is a non-package application and copy the source in the second
56+ # stage instead.
5457RUN uv sync --locked --no-default-groups --no-editable
5558
5659# # Final Image
@@ -84,8 +87,8 @@ WORKDIR ${APP_HOME}
8487COPY --from=python_builder ${UV_PROJECT_ENVIRONMENT} ${UV_PROJECT_ENVIRONMENT}
8588ENV PATH="${UV_PROJECT_ENVIRONMENT}/bin:${PATH}"
8689
87- # For Python applications that are not installable libraries, you may need to copy in source
88- # files here in the final image rather than in the python_builder image .
90+ # For non-package applications, COPY source files here rather than in the --no-editable step
91+ # in the python_builder stage .
8992
9093# Give access to the entire home folder to the new user so that files and folders can be written
9194# there. Some packages such as matplotlib, want to write to the home folder.
You can’t perform that action at this time.
0 commit comments