-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First commit of using Selenium instead of mock classes for e2e tests.…
… MUCH simpler.
- Loading branch information
Showing
3 changed files
with
248 additions
and
350 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,47 @@ | ||
FROM mcr.microsoft.com/azureml/promptflow/promptflow-runtime-stable:latest | ||
|
||
# No need to copy the app code, we mount via docker-compose-dev.yml | ||
ARG OPENAI_API_KEY | ||
ENV OPENAI_API_KEY=$OPENAI_API_KEY | ||
|
||
ARG OPENAI_API_ENDPOINT | ||
ENV OPENAI_API_ENDPOINT=$OPENAI_API_ENDPOINT | ||
|
||
COPY ./flows /app | ||
COPY ./utils /app/chainlit-ui-evaluation/utils | ||
COPY ./templates /app/chainlit-ui-evaluation/templates | ||
COPY ./management/skills.py /app/chainlit-ui-evaluation/recipes/skills.py | ||
COPY ./ui/chat-chainlit-assistant/app.py /app/chainlit-ui-evaluation/app.py | ||
|
||
RUN pip3 install --upgrade pip | ||
RUN pip3 install chainlit==1.1.305 | ||
|
||
WORKDIR /app/chainlit-ui-evaluation | ||
|
||
# Needed for running chainlit code if using Mock tests | ||
RUN pip3 install chainlit==1.1.305 | ||
RUN pip3 install langchain==0.2.1 | ||
RUN pip3 install langchain_openai==0.1.7 | ||
RUN pip3 install psycopg2_binary==2.9.9 | ||
RUN pip install keyrings.alt | ||
|
||
# Set up Connections | ||
RUN pf connection create --file ./openai.yaml --set api_key=$OPENAI_API_KEY --name open_ai_connection | ||
RUN pf connection create --file ./azure_openai.yaml --set api_key=$OPENAI_API_KEY --set api_base=$OPENAI_API_ENDPOINT --name azure_openai | ||
|
||
# ======= SELENIUM BEGIN ======== | ||
|
||
# Update package lists for the Ubuntu system | ||
RUN apt-get update | ||
|
||
# Download Chrome Debian package | ||
RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb | ||
|
||
# Install the Chrome Debian package | ||
RUN apt install ./google-chrome-stable_current_amd64.deb -y | ||
|
||
# Print the version of Google Chrome installed | ||
RUN google-chrome --version | ||
|
||
RUN pip install selenium==4.22.0 | ||
RUN pip install chromedriver-py==126.0.6478.126 | ||
|
||
# ======= SELENIUM END ======== |
Oops, something went wrong.