This commit is contained in:
nafer committed 2026-03-06 01:44:16 +03:00
1 parent cdba9a29f3
commit c1c0dfca9e
2 files changed
+15 -6

No files matched your search

+1 -1
View File
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/playwright/python:v1.45.0-jammy
FROM mcr.microsoft.com/playwright/python:v1.49.0-noble
# Установка дополнительных Python зависимостей
RUN pip install --no-cache-dir \
+14 -5
View File
@@ -36,6 +36,15 @@ class TaskResponse(BaseModel):
# Хранилище задач
tasks = {}
@app.on_event("startup")
async def startup_event():
import sys
import pkg_resources
print(f"Python version: {sys.version}")
print("Installed packages:")
for dist in pkg_resources.working_set:
print(f" {dist.project_name}=={dist.version}")
@app.post("/api/tasks", response_model=TaskResponse)
async def create_task(request: TaskRequest):
"""Создать новую задачу браузера"""
@@ -133,16 +142,16 @@ async def run_browser_task(task_id: str, task: str, max_steps: int, model: str):
chrome_cmd = [
chrome_exe,
f"--remote-debugging-port={REMOTE_DEBUGGING_PORT}",
f"--remote-debugging-address=0.0.0.0",
"--remote-debugging-address=0.0.0.0",
f"--user-data-dir={user_data_dir}",
"--remote-allow-origins=*",
"--headless=new",
"--no-sandbox",
"--disable-dev-shm-usage",
"--disable-gpu",
"--no-first-run",
"--no-default-browser-check",
"--disable-extensions",
"--disable-gpu",
"--no-sandbox",
"--disable-dev-shm-usage",
"--headless",
"about:blank"
]