microsoft / microsoft/promptflow
Optimized Dockerfile template for building custom Prompt Flow containers.
@wangchao1230 is already working on this.
Since Nov 14, 2023.
- Dominant language
- Python
- Stars
- 11.2k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
Is your feature request related to a problem? Please describe.
The feature request is not related to a problem, but a possibility to optimize Prompt Flow performance.
Describe the solution you'd like
The pf flow build --format docker command adds a Dockerfile based on docker.io/continuumio/miniconda3:latest as can be found in:
This works, but results in long Docker image build times and possibly unwanted overhead.
Describe alternatives you've considered
I found that substituting this with the following Dockerfile results in much faster build times and much smaller and faster pushes to a container registry:
# syntax=docker/dockerfile:1
FROM mcr.microsoft.com/azureml/promptflow/promptflow-runtime-stable:latest
WORKDIR /
COPY ./flow /flow
EXPOSE 8080
COPY ./connections/* /connections/
RUN pip install keyrings.alt -r /flow/requirements.txt
# reset runsvdir
RUN rm -rf /var/runit
COPY ./runit /var/runit
# grant permission
RUN chmod -R +x /var/runit
COPY ./start.sh /
CMD ["bash", "./start.sh"]
Additional context
This documentation page also mentiones, that Dockerfiles created to run Prompt Flow should be based on promptflow-runtime-stable.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.