Quickstart v1 (#9)

This commit is contained in:
Kerem Yilmaz
2024-03-03 18:14:17 -08:00
committed by GitHub
parent 2123b2da31
commit 295daa14a8
3 changed files with 52 additions and 3 deletions

View File

@@ -31,7 +31,40 @@ Want to see more examples of Skyvern in action? Click [here](#real-world-example
## Quickstart
<< TODO >>
This quickstart guide will walk you through getting Skyvern up and running on your local machine.
### Prerequisites
Before you begin, make sure you have the following installed:
- [Python 3.11](https://www.python.org/downloads/)
- [Poetry](https://python-poetry.org/docs/#installation)
- [PostgreSQL 14](https://www.postgresql.org/download/) (if you're on a Mac, setup script will install it for you if you have homebrew installed)
### Setup
1. Clone the repository and navigate to the root directory
2. Run the setup script to install the necessary dependencies and setup your environment
```bash
./setup.sh
```
3. Create the `.env` file by copying the `.env.example` file and fill in the necessary environment variables
```bash
cp .env.example .env
```
4. Start the server
```bash
./run.sh
```
5. You can start sending requests to the server, but we built a simple UI to help you get started. To start the UI, run the following command:
```bash
./run_streamlit.sh
```
6. Navigate to `http://localhost:8501` in your browser to start using the UI
### Additional Setup for Contributors
If you're looking to contribute to Skyvern, you'll need to install the pre-commit hooks to ensure code quality and consistency. You can do this by running the following command:
```bash
pre-commit install
```
## Documentation

1
run_streamlit.sh Normal file
View File

@@ -0,0 +1 @@
streamlit run streamlit_app/visualizer/streamlit.py

View File

@@ -6,7 +6,7 @@ command_exists() {
}
# Ensure required commands are available
for cmd in poetry pre-commit brew python; do
for cmd in poetry python3.11; do
if ! command_exists "$cmd"; then
echo "Error: $cmd is not installed." >&2
exit 1
@@ -28,16 +28,30 @@ remove_poetry_env() {
# Function to install dependencies
install_dependencies() {
poetry install
pre-commit install
}
activate_poetry_env() {
source "$(poetry env info --path)/bin/activate"
}
install_dependencies_after_poetry_env() {
playwright install
}
# Function to setup PostgreSQL
setup_postgresql() {
echo "Installing postgresql using brew"
if ! command_exists psql; then
echo "`postgresql` is not installed."
if [[ "$OSTYPE" != "darwin"* ]]; then
echo "Error: Please install postgresql manually and re-run the script." >&2
exit 1
fi
if ! command_exists brew; then
echo "Error: brew is not installed, please install homebrew and re-run the script or install postgresql manually." >&2
exit 1
fi
fi
brew install postgresql@14
brew services start postgresql@14
@@ -83,6 +97,7 @@ main() {
install_dependencies
setup_postgresql
activate_poetry_env
install_dependencies_after_poetry_env
run_alembic_upgrade
create_organization
echo "Setup completed successfully."