Prompt Flow (Part 2)
Neil Haddley • June 12, 2024
Running an Azure Prompt Flow application inside a Docker container using the VS Code Prompt Flow extension
I used Prompt flow for Visual Studio Code to create and run a flow in a Docker container
OpenAI connection
I created a second flow with an OpenAI connection
Dockerfile
TEXT
1# syntax=docker/dockerfile:1 2FROM docker.io/continuumio/miniconda3:latest 3 4WORKDIR / 5 6COPY ./flow/requirements.txt /flow/requirements.txt 7 8# gcc is for build psutil in MacOS 9RUN apt-get update && apt-get install -y runit gcc 10 11# create conda environment 12RUN conda create -n promptflow-serve python=3.9.16 pip=23.0.1 -q -y && \ 13 conda run -n promptflow-serve \ 14 pip install -r /flow/requirements.txt && \ 15 conda run -n promptflow-serve pip install keyrings.alt && \ 16 conda run -n promptflow-serve pip install gunicorn==20.1.0 && \ 17 conda run -n promptflow-serve pip install 'uvicorn>=0.27.0,<1.0.0' && \ 18 conda run -n promptflow-serve pip cache purge && \ 19 conda clean -a -y 20 21COPY ./flow /flow 22 23 24EXPOSE 8080 25 26COPY ./connections /connections 27 28# reset runsvdir 29RUN rm -rf /var/runit 30COPY ./runit /var/runit 31# grant permission 32RUN chmod -R +x /var/runit 33 34COPY ./start.sh / 35CMD ["bash", "./start.sh"]



























