Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 14 additions & 61 deletions .container/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,74 +1,27 @@
# Git
.git
.gitignore
.github

# Docker
Dockerfile
docker-compose.yml
.dockerignore
DOCKER_README.md
run_in_docker.sh
Dockerfile

# Python
__pycache__/
*.py[cod]
*$py.class
*.so
*.pyc
*.pyo
*.pyd
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg
.pytest_cache/
.coverage
htmlcov/

# Virtual environments
venv/
ENV/
env/
.env
.venv

# IDE
.idea/
.vscode/
*.swp
*.swo
# Other
.idea
.vscode
*.so
*.egg-info
dist
build
*.log*
logs
.DS_Store

# Temporary files
temp_*
*.tmp
*.log
*.bak

# Cache
.cache/
.npm/
.yarn/

# Large data files
*.csv
*.sqlite
*.db
*.hdf5
*.h5
*.parquet
*.feather
*.pkl
*.pickle

# Data directory
data/
74 changes: 74 additions & 0 deletions .container/.dockerignore.old
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Git
.git
.gitignore
.github

# Docker
Dockerfile
docker-compose.yml
.dockerignore
DOCKER_README.md
run_in_docker.sh

# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg
.pytest_cache/
.coverage
htmlcov/

# Virtual environments
venv/
ENV/
env/
.env

# IDE
.idea/
.vscode/
*.swp
*.swo
.DS_Store

# Temporary files
temp_*
*.tmp
*.log
*.bak

# Cache
.cache/
.npm/
.yarn/

# Large data files
*.csv
*.sqlite
*.db
*.hdf5
*.h5
*.parquet
*.feather
*.pkl
*.pickle

# Data directory
data/
File renamed without changes.
2 changes: 1 addition & 1 deletion .container/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD python -c "import sys; sys.exit(0 if __import__('os').path.exists('/app/owl') else 1)"

# Container startup command
CMD ["/bin/bash", "-c", "owl-welcome && /bin/bash"]
CMD ["xvfb-python", "webapp.py"]
38 changes: 38 additions & 0 deletions .container/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# OWL Docker Deployment

This document provides instructions on how to build and run the OWL application using Docker.

## Prerequisites

- Docker
- Docker Compose

## Building the Docker Image

To build the Docker image, run the following command from the `.container` directory:

```bash
docker-compose build
```

## Running the Application

To run the application, use the following command from the `.container` directory:

```bash
docker-compose up
```

The application will be accessible at `http://localhost:7860`.

## Environment Variables

You can configure the application by creating a `.env` file in the `owl` directory. A template file is provided at `owl/.env_template`.

## Stopping the Application

To stop the application, press `Ctrl+C` in the terminal where `docker-compose up` is running, and then run:

```bash
docker-compose down
```
20 changes: 4 additions & 16 deletions .container/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,12 @@
services:
owl:
# Option 1: Use pre-built image from Docker Hub
image: mugglejinx/owl:latest

# Option 2: Build image locally
# Uncomment the following lines and comment out the 'image' line above to build locally
# build:
# context: ..
# dockerfile: .container/Dockerfile

build:
context: ..
dockerfile: .container/Dockerfile
volumes:
# Mount .env file for easy API key configuration
- ../owl/.env:/app/owl/.env
# Mount examples folder to support running code examples inside the Docker container
- ../examples:/app/examples
# Mount data directory
- ./data:/app/owl/data
# Mount cache directories to avoid repeated downloads
- ~/.cache/pip:/root/.pip/cache
- ~/.cache/playwright:/root/.cache/ms-playwright
environment:
Expand All @@ -33,13 +23,11 @@ services:
stdin_open: true
tty: true
shm_size: 2gb
# Simplify resource limits
deploy:
resources:
limits:
memory: 4G

# Define persistent volumes for caching
volumes:
playwright-cache:
pip-cache:
pip-cache:
45 changes: 45 additions & 0 deletions .container/docker-compose.yml.old
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
services:
owl:
# Option 1: Use pre-built image from Docker Hub
image: mugglejinx/owl:latest

# Option 2: Build image locally
# Uncomment the following lines and comment out the 'image' line above to build locally
# build:
# context: ..
# dockerfile: .container/Dockerfile

volumes:
# Mount .env file for easy API key configuration
- ../owl/.env:/app/owl/.env
# Mount examples folder to support running code examples inside the Docker container
- ../examples:/app/examples
# Mount data directory
- ./data:/app/owl/data
# Mount cache directories to avoid repeated downloads
- ~/.cache/pip:/root/.pip/cache
- ~/.cache/playwright:/root/.cache/ms-playwright
environment:
- OPENAI_API_KEY=${OPENAI_API_KEY}
- DISPLAY=:99
- PYTHONDONTWRITEBYTECODE=1
- PYTHONUNBUFFERED=1
- TERM=xterm-256color
- GRADIO_SERVER_NAME=0.0.0.0
- GRADIO_SERVER_PORT=7860
- PYTHONPATH=.
ports:
- "7860:7860"
stdin_open: true
tty: true
shm_size: 2gb
# Simplify resource limits
deploy:
resources:
limits:
memory: 4G

# Define persistent volumes for caching
volumes:
playwright-cache:
pip-cache: