Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3937 - Parse the current Python version to the Dockerfile in pf build flow #3939

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/promptflow-devkit/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# promptflow-devkit package

### Improvements
- Python version in the conda environment in the deployed docker image is parsed from the environment that calls the build command.


## v1.17.2 (2025.1.23)

### Improvements
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ COPY ./flow/{{env.conda_file}} /flow/{{env.conda_file}}

RUN conda create -f flow/{{env.conda_file}} -q && \
{% else %}
RUN conda create -n {{env.conda_env_name}} python=3.9.16 pip=23.0.1 -q -y && \
RUN conda create -n {{env.conda_env_name}} python={{env.python_version}} pip=23.0.1 -q -y && \
{% endif %}
conda run -n {{env.conda_env_name}} \
{% if env.python_requirements_txt %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,8 @@ def _build_environment_config(self, flow_dag_path: Path):
conda_obj = load_yaml(conda_file)
if "name" in conda_obj:
env_obj["conda_env_name"] = conda_obj["name"]
# Set deployed python version to the current python version
env_obj["python_version"] = platform.python_version()

return env_obj

Expand Down
Loading