mirror of
https://github.com/tcsenpai/agenticSeek.git
synced 2025-06-01 16:50:10 +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
|
||||
|
||||
# Install system dependencies
|
||||
RUN apt-get update && apt-get install -y \
|
||||
gcc \
|
||||
g++ \
|
||||
gfortran \
|
||||
libportaudio2 \
|
||||
portaudio19-dev \
|
||||
ffmpeg \
|
||||
libavcodec-dev \
|
||||
libavformat-dev \
|
||||
libavutil-dev \
|
||||
chromium \
|
||||
chromium-driver \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN pip cache purge
|
||||
RUN apt-get update -qq -y && \
|
||||
apt-get install -y \
|
||||
gcc \
|
||||
g++ \
|
||||
gfortran \
|
||||
libportaudio2 \
|
||||
portaudio19-dev \
|
||||
ffmpeg \
|
||||
libavcodec-dev \
|
||||
libavformat-dev \
|
||||
libavutil-dev \
|
||||
gnupg2 \
|
||||
wget \
|
||||
unzip \
|
||||
python3 \
|
||||
python3-pip \
|
||||
libasound2 \
|
||||
libatk-bridge2.0-0 \
|
||||
libgtk-4-1 \
|
||||
libnss3 \
|
||||
xdg-utils \
|
||||
wget && \
|
||||
|
||||
RUN chmod +x /opt/chrome/chrome
|
||||
# Install dependencies
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
@ -66,46 +66,36 @@ services:
|
||||
networks:
|
||||
- agentic-seek-net
|
||||
|
||||
backend:
|
||||
container_name: backend
|
||||
build:
|
||||
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
|
||||
# NOTE: backend service is not working yet due to issue with chromedriver on docker.
|
||||
# Therefore backend is run on host machine.
|
||||
# Open to pull requests to fix this.
|
||||
|
||||
#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:
|
||||
redis-data:
|
||||
chrome_profiles:
|
||||
|
@ -122,7 +122,7 @@ function App() {
|
||||
const handleGetScreenshot = async () => {
|
||||
try {
|
||||
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 }));
|
||||
setCurrentView('screenshot');
|
||||
} catch (err) {
|
||||
|
@ -39,7 +39,7 @@ def get_chrome_path() -> str:
|
||||
paths = ["/Applications/Google Chrome.app/Contents/MacOS/Google Chrome",
|
||||
"/Applications/Google Chrome Beta.app/Contents/MacOS/Google Chrome Beta"]
|
||||
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:
|
||||
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 = os.getenv(api_key_var)
|
||||
if not api_key:
|
||||
api_key = input(f"Please enter your {provider} API key: ")
|
||||
set_key(".env", api_key_var, api_key)
|
||||
self.logger.info("Set API key in env.")
|
||||
load_dotenv()
|
||||
pretty_print(f"API key {api_key_var} not found in .env file. Please add it", color="warning")
|
||||
exit(1)
|
||||
return api_key
|
||||
|
||||
def check_address_format(self, address):
|
||||
|
Loading…
x
Reference in New Issue
Block a user