Closed wodecki closed 7 months ago
Solved with the following Dockerfile:
FROM python:3.11
# Copy the entire project directory
COPY . /app
WORKDIR /app
RUN pip install chainlit langchain openai
# Use a shell form to execute a sequence of commands
# Using `sh -c` to ensure the pipe works correctly
ENTRYPOINT sh -c "python create_assistant.py | chainlit run app.py --host=0.0.0.0 --port=$PORT --headless"
I run the OpenAI Assistance cookbook with:
python create_assistant.py
> correctly generatesassistants.json
with {"math_tutor_and_weather_bot": "asst_uhU...Z3"}chainlit run app.py
The WebUI generates the following error:
It works after adding a snippet that directly reads the assistant_id from json at the top of app.py:
My question: How should I set it up to make it possible to deploy the app as the docker on Google Cloud Run? I mean: how to set up the sequence: 1. create_assistant.py > 2. chainlit run app.py?