mirror of
https://github.com/tcsenpai/agenticSeek.git
synced 2025-06-03 01:30:11 +00:00
added backend environment in docker
This commit is contained in:
parent
d6ec56b5df
commit
eda277aa54
35
Dockerfile.python-env
Normal file
35
Dockerfile.python-env
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
FROM ubuntu:22.04
|
||||||
|
|
||||||
|
# Set working directory
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Install system dependencies
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get install -y \
|
||||||
|
python3-dev \
|
||||||
|
python3-pip \
|
||||||
|
python3-wheel \
|
||||||
|
build-essential \
|
||||||
|
alsa-utils \
|
||||||
|
portaudio19-dev \
|
||||||
|
libgtk-3-dev \
|
||||||
|
libnotify-dev \
|
||||||
|
libgconf-2-4 \
|
||||||
|
libnss3 \
|
||||||
|
libxss1 && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Upgrade pip and install Python packages
|
||||||
|
RUN pip3 install --upgrade pip setuptools wheel && \
|
||||||
|
pip3 install selenium
|
||||||
|
|
||||||
|
# Copy requirements.txt first to leverage Docker cache
|
||||||
|
COPY requirements.txt .
|
||||||
|
RUN pip3 install -r requirements.txt --no-cache-dir
|
||||||
|
|
||||||
|
# Copy the rest of the application
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
# Set environment variables for Chrome paths with defaults
|
||||||
|
ENV CHROME_EXECUTABLE_PATH=/app/chrome_bundle/chrome136/chrome-linux64/chrome
|
||||||
|
ENV CHROMEDRIVER_PATH=/app/chrome_bundle/chrome136/chromedriver
|
@ -65,7 +65,23 @@ services:
|
|||||||
- REACT_APP_BACKEND_URL=http://0.0.0.0:${BACKEND_PORT:-8000}
|
- REACT_APP_BACKEND_URL=http://0.0.0.0:${BACKEND_PORT:-8000}
|
||||||
networks:
|
networks:
|
||||||
- agentic-seek-net
|
- agentic-seek-net
|
||||||
|
|
||||||
|
python-env:
|
||||||
|
container_name: python-env
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile.python-env
|
||||||
|
ports:
|
||||||
|
- ${BACKEND_PORT:-8000}:${BACKEND_PORT:-8000}
|
||||||
|
volumes:
|
||||||
|
- ./:/app
|
||||||
|
- ${WORK_DIR}:${WORK_DIR}
|
||||||
|
command: python3 api.py
|
||||||
|
environment:
|
||||||
|
- SEARXNG_URL=http://localhost:8080
|
||||||
|
- WORK_DIR=${WORK_DIR}
|
||||||
|
network_mode: "host"
|
||||||
|
|
||||||
# NOTE: backend service is not working yet due to issue with chromedriver on docker.
|
# NOTE: backend service is not working yet due to issue with chromedriver on docker.
|
||||||
# Therefore backend is run on host machine.
|
# Therefore backend is run on host machine.
|
||||||
# Open to pull requests to fix this.
|
# Open to pull requests to fix this.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user