Skip to content
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

Created the docker file and the docker-compose file #24

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
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
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Use an official Python runtime as a parent image
FROM python:3.10-slim

# Set the working directory in the container
WORKDIR /app

# Copy the current directory contents into the container
COPY . /app

# Install omagent_core as an editable package
RUN pip install -e omagent-core

# Install all other dependencies
RUN pip install -r requirements.txt

# Expose a port to allow external connections to the container
EXPOSE 8000

# Run the application
CMD ["python", "run.py"]
32 changes: 32 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
version: '3'

services:
omagent:
build: .
container_name: omagent_app
ports:
- "8000:8000" # Expose app's default port
volumes:
- .:/app # Mount the project directory
environment:
custom_openai_endpoint: "your_openai_endpoint"
custom_openai_key: "your_openai_key"
bing_api_key: "your_bing_key"
ovd_endpoint: "http://milvus:8000/inf_predict" # Point to the Milvus service
ovd_model_id: "OmDet-Turbo_tiny_SWIN_T"
depends_on:
- milvus
command: python run.py # Run the main script

milvus:
image: milvusdb/milvus:v2.3.0
container_name: milvus
ports:
- "19530:19530" # Milvus default port for vector database communication
environment:
MILVUS_MODE: "standalone"
volumes:
- milvus_data:/var/lib/milvus

volumes:
milvus_data: {}