-
Notifications
You must be signed in to change notification settings - Fork 688
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
docker compose setup #162
docker compose setup #162
Conversation
LawyZheng
commented
Apr 7, 2024
- build a docker image
- support docker compose setup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall. Thanks for building this!
Dockerfile
Outdated
COPY --from=requirements-stage /tmp/requirements.txt /app/requirements.txt | ||
RUN pip install --no-cache-dir --upgrade -r requirements.txt | ||
RUN pip install --no-cache-dir streamlit | ||
# Use following command, if you have network problem |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what are these comments? can we delete these comments?
docker-compose.yml
Outdated
- BROWSER_TYPE=chromium-headful | ||
- ENABLE_OPENAI=true | ||
- OPENAI_API_KEY=<your_openai_key> | ||
# If you want to use other LLM provide, like azure or anthropic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# If you want to use other LLM provide, like azure or anthropic | |
# If you want to use other LLM provider, like azure and anthropic: |
- ./videos:/data/videos | ||
- ./har:/data/har | ||
- ./.streamlit:/app/.streamlit | ||
environment: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we point it to the .env
file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If .env
pointed, users need to run the docker-compose together with .env
.
In this way, rookie users could run the single docker-compose.yml
file.
And advanced users could point it to the .env
by themselves.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides, if we change the settings in env, we are supposed to restart/recreate the container.
If we have an isolated env setting file, I think it's easy to forget to restart/recreate.
I think load from .env
could be more useful if we want to share the same env between multiple containers, instead of running a single container
docker-compose.yml
Outdated
depends_on: | ||
- postgres |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This wouldn't work well because this way it just waits for the container to be up. Instead, we should be waiting for postgres to be ready.
This eventually works out but until skyvern is up, the container will restart multiple times since it'll die without a healthy DB.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, I have noticed it already.
But I don't have any idea how to make skyvern check the DB health hook in docker-compose.
Any good idea?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I just let skyvern restart on failure. haha
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it works but if someone checks out the logs or runs without -d
it could get confusing 😄
Can you check this out and see if it works? I did something similar before, if this doesn't work we can hop on a call later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It worked.
Co-authored-by: Kerem Yilmaz <kerem@skyvern.com>
@@ -101,6 +101,16 @@ Note: Our setup script does these two for you, but they are here for reference. | |||
``` | |||
1. Navigate to `http://localhost:8501` in your browser to start using the UI | |||
|
|||
## Docker Compose setup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should test the docker, (maybe even ask people in DC to test it out and provide feedback) and when it's all good this should be the primary way to start using Skyvern.
@LawyZheng the Skyvern container waits the postgres to actually be ready now!! 🎉 Stearmlit can't connect to the server though:
LMK if you need help debugging. |
@ykeremy you'd better delete or move away the old
|
My default docker-compose is prepared for uses who haven't do any setups yet. |
Removing the old secrets.toml was the solution 🎉 There will be users who already set something up in their locals that would like to start using the dockerized solution. Let's think about how we should let people know about stuff like this. I'll add this to our discussions topics in tomorrow's meeting. |
btw this seems to be working, i've just tested it :) Thanks |