mirror of
https://github.com/tcsenpai/agenticSeek.git
synced 2025-06-03 01:30:11 +00:00
commented out backend service until solution found for chrome in docker problem
This commit is contained in:
parent
36b26b43c9
commit
ad9ca5e7cb
@ -1,24 +1,32 @@
|
|||||||
FROM python:3.10
|
FROM ubuntu:22.04
|
||||||
|
# Warning: doesn't work yet, backend is run on host machine for now
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Install system dependencies
|
RUN apt-get update -qq -y && \
|
||||||
RUN apt-get update && apt-get install -y \
|
apt-get install -y \
|
||||||
gcc \
|
gcc \
|
||||||
g++ \
|
g++ \
|
||||||
gfortran \
|
gfortran \
|
||||||
libportaudio2 \
|
libportaudio2 \
|
||||||
portaudio19-dev \
|
portaudio19-dev \
|
||||||
ffmpeg \
|
ffmpeg \
|
||||||
libavcodec-dev \
|
libavcodec-dev \
|
||||||
libavformat-dev \
|
libavformat-dev \
|
||||||
libavutil-dev \
|
libavutil-dev \
|
||||||
chromium \
|
gnupg2 \
|
||||||
chromium-driver \
|
wget \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
unzip \
|
||||||
|
python3 \
|
||||||
RUN pip cache purge
|
python3-pip \
|
||||||
|
libasound2 \
|
||||||
|
libatk-bridge2.0-0 \
|
||||||
|
libgtk-4-1 \
|
||||||
|
libnss3 \
|
||||||
|
xdg-utils \
|
||||||
|
wget && \
|
||||||
|
|
||||||
|
RUN chmod +x /opt/chrome/chrome
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
COPY requirements.txt .
|
COPY requirements.txt .
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
@ -66,46 +66,36 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- agentic-seek-net
|
- agentic-seek-net
|
||||||
|
|
||||||
backend:
|
# NOTE: backend service is not working yet due to issue with chromedriver on docker.
|
||||||
container_name: backend
|
# Therefore backend is run on host machine.
|
||||||
build:
|
# Open to pull requests to fix this.
|
||||||
context: ./
|
|
||||||
dockerfile: Dockerfile.backend
|
|
||||||
stdin_open: true
|
|
||||||
tty: true
|
|
||||||
shm_size: 6g
|
|
||||||
ports:
|
|
||||||
- "8000:8000"
|
|
||||||
volumes:
|
|
||||||
- ./:/app
|
|
||||||
#network_mode: host
|
|
||||||
environment:
|
|
||||||
- NODE_ENV=development
|
|
||||||
- REDIS_URL=redis://redis:6379/0
|
|
||||||
- SEARXNG_URL=http://searxng:8080
|
|
||||||
- OLLAMA_URL=http://localhost:11434
|
|
||||||
- LM_STUDIO_URL=http://localhost:1234
|
|
||||||
extra_hosts:
|
|
||||||
- "host.docker.internal:host-gateway"
|
|
||||||
depends_on:
|
|
||||||
- redis
|
|
||||||
- searxng
|
|
||||||
- selenium
|
|
||||||
networks:
|
|
||||||
- agentic-seek-net
|
|
||||||
|
|
||||||
selenium:
|
|
||||||
image: selenium/standalone-chrome
|
|
||||||
platform: linux/amd64
|
|
||||||
shm_size: 2g
|
|
||||||
volumes:
|
|
||||||
- /dev/shm:/dev/shm
|
|
||||||
- chrome_profiles:/tmp/chrome
|
|
||||||
ports:
|
|
||||||
- 4444:4444
|
|
||||||
networks:
|
|
||||||
- agentic-seek-net
|
|
||||||
|
|
||||||
|
#backend:
|
||||||
|
# container_name: backend
|
||||||
|
# build:
|
||||||
|
# context: ./
|
||||||
|
# dockerfile: Dockerfile.backend
|
||||||
|
# stdin_open: true
|
||||||
|
# tty: true
|
||||||
|
# shm_size: 8g
|
||||||
|
# ports:
|
||||||
|
# - "8000:8000"
|
||||||
|
# volumes:
|
||||||
|
# - ./:/app
|
||||||
|
# environment:
|
||||||
|
# - NODE_ENV=development
|
||||||
|
# - REDIS_URL=redis://redis:6379/0
|
||||||
|
# - SEARXNG_URL=http://searxng:8080
|
||||||
|
# - OLLAMA_URL=http://localhost:11434
|
||||||
|
# - LM_STUDIO_URL=http://localhost:1234
|
||||||
|
# extra_hosts:
|
||||||
|
# - "host.docker.internal:host-gateway"
|
||||||
|
# depends_on:
|
||||||
|
# - redis
|
||||||
|
# - searxng
|
||||||
|
# networks:
|
||||||
|
# - agentic-seek-net
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
redis-data:
|
redis-data:
|
||||||
chrome_profiles:
|
chrome_profiles:
|
||||||
|
@ -122,7 +122,7 @@ function App() {
|
|||||||
const handleGetScreenshot = async () => {
|
const handleGetScreenshot = async () => {
|
||||||
try {
|
try {
|
||||||
console.log('Fetching screenshot...');
|
console.log('Fetching screenshot...');
|
||||||
const res = await axios.get('http://0.0.0.0:8000/screenshots/updated_screen.png');
|
const res = await axios.get('http://backend:8000/screenshots/updated_screen.png');
|
||||||
setResponseData((prev) => ({ ...prev, screenshot: res.data.screenshot }));
|
setResponseData((prev) => ({ ...prev, screenshot: res.data.screenshot }));
|
||||||
setCurrentView('screenshot');
|
setCurrentView('screenshot');
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
@ -39,7 +39,7 @@ def get_chrome_path() -> str:
|
|||||||
paths = ["/Applications/Google Chrome.app/Contents/MacOS/Google Chrome",
|
paths = ["/Applications/Google Chrome.app/Contents/MacOS/Google Chrome",
|
||||||
"/Applications/Google Chrome Beta.app/Contents/MacOS/Google Chrome Beta"]
|
"/Applications/Google Chrome Beta.app/Contents/MacOS/Google Chrome Beta"]
|
||||||
else: # Linux
|
else: # Linux
|
||||||
paths = ["/usr/bin/google-chrome", "/usr/bin/chromium-browser", "/usr/bin/chromium"]
|
paths = ["/usr/bin/google-chrome", "/usr/bin/chromium-browser", "/usr/bin/chromium", "/opt/chrome/chrome", "/usr/local/bin/chrome"]
|
||||||
|
|
||||||
for path in paths:
|
for path in paths:
|
||||||
if os.path.exists(path) and os.access(path, os.X_OK): # Check if executable
|
if os.path.exists(path) and os.access(path, os.X_OK): # Check if executable
|
||||||
|
@ -53,10 +53,8 @@ class Provider:
|
|||||||
api_key_var = f"{provider.upper()}_API_KEY"
|
api_key_var = f"{provider.upper()}_API_KEY"
|
||||||
api_key = os.getenv(api_key_var)
|
api_key = os.getenv(api_key_var)
|
||||||
if not api_key:
|
if not api_key:
|
||||||
api_key = input(f"Please enter your {provider} API key: ")
|
pretty_print(f"API key {api_key_var} not found in .env file. Please add it", color="warning")
|
||||||
set_key(".env", api_key_var, api_key)
|
exit(1)
|
||||||
self.logger.info("Set API key in env.")
|
|
||||||
load_dotenv()
|
|
||||||
return api_key
|
return api_key
|
||||||
|
|
||||||
def check_address_format(self, address):
|
def check_address_format(self, address):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user