diff --git a/dockerfiles/py.Dockerfile b/dockerfiles/py.Dockerfile index a3916790..966454c8 100644 --- a/dockerfiles/py.Dockerfile +++ b/dockerfiles/py.Dockerfile @@ -3,9 +3,9 @@ FROM python:3.11-bullseye as build # Install protobuf compiler RUN apt-get update \ - && DEBIAN_FRONTEND=noninteractive \ + && DEBIAN_FRONTEND=noninteractive \ apt-get install --no-install-recommends --assume-yes \ - protobuf-compiler=3.12.4* libprotobuf-dev=3.12.4* + protobuf-compiler=3.12.4* libprotobuf-dev=3.12.4* # Get go compiler ARG PLATFORM=amd64 @@ -57,5 +57,7 @@ COPY --from=build /app/${REPO_DIR_OR_PLACEHOLDER} /app/${REPO_DIR_OR_PLACEHOLDER COPY --from=build /app/uv.lock /app/pyproject.toml /app/ COPY --from=build /bin/uv /bin/uvx /bin/ +ENV UV_NO_SYNC=1 UV_FROZEN=1 UV_OFFLINE=1 + # Use entrypoint instead of command to "bake" the default command options ENTRYPOINT ["/app/temporal-features", "run", "--lang", "py", "--prepared-dir", "prepared"] diff --git a/sdkbuild/python.go b/sdkbuild/python.go index 82a6fb1b..6e62cfc8 100644 --- a/sdkbuild/python.go +++ b/sdkbuild/python.go @@ -3,13 +3,12 @@ package sdkbuild import ( "context" "fmt" + "io" "os" "os/exec" "path/filepath" "runtime" "strings" - - "io" ) // BuildPythonProgramOptions are options for BuildPythonProgram. @@ -180,7 +179,7 @@ func PythonProgramFromDir(dir string) (*PythonProgram, error) { // Dir is the directory to run in. func (p *PythonProgram) Dir() string { return p.dir } -// NewCommand makes a new Poetry command. The first argument needs to be the +// NewCommand makes a new uv command. The first argument needs to be the // name of the module. func (p *PythonProgram) NewCommand(ctx context.Context, args ...string) (*exec.Cmd, error) { args = append([]string{"run", "python", "-m"}, args...)