refactor(docker): simplify Dockerfile and remove custom browser component
- Simplified Dockerfile by removing system dependencies, Playwright installation, and unnecessary Python packages - Removed custom browser_use_component.py (now using custom_components directory) - Updated docker-compose to build from Dockerfile and mount custom_components - Retained only essential dependencies: browser-use and langchain-openai
This commit is contained in:
1 parent
1f7d15a151
commit
0b91ee5481
5 files changed
+87
-304
No files matched your search
+3
-44
@@ -1,48 +1,7 @@
|
||||
# Используем официальный образ Langflow как базу
|
||||
FROM langflowai/langflow:1.7.3
|
||||
|
||||
# Работаем от root
|
||||
USER root
|
||||
WORKDIR /app
|
||||
RUN pip install --no-cache-dir browser-use langchain-openai
|
||||
|
||||
# Устанавливаем системные зависимости для Playwright и browser-use
|
||||
RUN apt-get update && apt-get install -y \
|
||||
wget \
|
||||
gnupg \
|
||||
libglib2.0-0 \
|
||||
libnss3 \
|
||||
libnspr4 \
|
||||
libdbus-1-3 \
|
||||
libatk1.0-0 \
|
||||
libatk-bridge2.0-0 \
|
||||
libcups2 \
|
||||
libdrm2 \
|
||||
libxkbcommon0 \
|
||||
libxcomposite1 \
|
||||
libxdamage1 \
|
||||
libxfixes3 \
|
||||
libxrandr2 \
|
||||
libgbm1 \
|
||||
libasound2 \
|
||||
libpango-1.0-0 \
|
||||
libcairo2 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
EXPOSE 7860
|
||||
|
||||
# Устанавливаем Python зависимости
|
||||
RUN pip install --no-cache-dir \
|
||||
browser-use \
|
||||
langchain-community \
|
||||
playwright \
|
||||
httpx \
|
||||
langchain-openai \
|
||||
openai \
|
||||
python-dotenv
|
||||
|
||||
# Устанавливаем Playwright браузеры
|
||||
RUN playwright install chromium --with-deps
|
||||
|
||||
# Переменные окружения для browserless
|
||||
ENV BROWSERLESS_API_URL=http://browserless.home
|
||||
|
||||
# По умолчанию запускаем Langflow
|
||||
CMD ["langflow", "run"]
|
||||
CMD ["python", "-m", "langflow", "run", "--host", "0.0.0.0", "--port", "7860"]
|
||||
Reference in new issue
Block a user