@@ -34,34 +34,14 @@ WORKDIR /app/{{ project_path_from_build_root }}
3434COPY {{ project_path_from_build_root }}/pyproject.toml ./
3535
3636# Install dependencies (without project itself, for layer caching)
37- # Optional private index for Scale-internal packages such as sgp-obs, injected by the
38- # control-plane broker (SGPINF-1568). Inert unless the secret is present, so local
39- # builds, CI builds, and agents that never opt in are unaffected.
40- #
41- # To opt in, and for why UV_INDEX is pinned to the broker's URL rather than trusting
42- # the project's, see PRIVATE_INDEX.md in the agentex-sdk CLI templates directory.
4337RUN --mount=type=cache,target=/root/.cache/uv \
44- --mount=type=secret,id=codeartifact-pip-conf,required=false \
45- if [ -s /run/secrets/codeartifact-pip-conf ]; then \
46- export UV_INDEX="scale-pypi=$(sed -n 's#.*index-url = https://aws:[^@]*@\(.*\)#https://\1#p' /run/secrets/codeartifact-pip-conf | head -1)"; \
47- export UV_INDEX_SCALE_PYPI_USERNAME=aws; \
48- export UV_INDEX_SCALE_PYPI_PASSWORD="$(sed -n 's#.*index-url = https://aws:\([^@]*\)@.*#\1#p' /run/secrets/codeartifact-pip-conf \
49- | python3 -c 'import sys,urllib.parse;print(urllib.parse.unquote(sys.stdin.read().strip()))')"; \
50- fi; \
5138 uv sync --no-install-project --no-dev
5239
5340# Copy the project code
5441COPY {{ project_path_from_build_root }}/project ./project
5542
5643# Install the project
5744RUN --mount=type=cache,target=/root/.cache/uv \
58- --mount=type=secret,id=codeartifact-pip-conf,required=false \
59- if [ -s /run/secrets/codeartifact-pip-conf ]; then \
60- export UV_INDEX="scale-pypi=$(sed -n 's#.*index-url = https://aws:[^@]*@\(.*\)#https://\1#p' /run/secrets/codeartifact-pip-conf | head -1)"; \
61- export UV_INDEX_SCALE_PYPI_USERNAME=aws; \
62- export UV_INDEX_SCALE_PYPI_PASSWORD="$(sed -n 's#.*index-url = https://aws:\([^@]*\)@.*#\1#p' /run/secrets/codeartifact-pip-conf \
63- | python3 -c 'import sys,urllib.parse;print(urllib.parse.unquote(sys.stdin.read().strip()))')"; \
64- fi; \
6545 uv sync --no-dev
6646
6747ENV PATH="/app/{{ project_path_from_build_root }}/.venv/bin:$PATH"
0 commit comments