feat: codex-register with Sub2API增强 + Playwright引擎
Some checks are pending
Docker Image CI / build-and-push-image (push) Waiting to run
Some checks are pending
Docker Image CI / build-and-push-image (push) Waiting to run
This commit is contained in:
57
Dockerfile
Normal file
57
Dockerfile
Normal file
@@ -0,0 +1,57 @@
|
||||
FROM python:3.11-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
ENV PYTHONDONTWRITEBYTECODE=1 \
|
||||
PYTHONUNBUFFERED=1 \
|
||||
WEBUI_HOST=0.0.0.0 \
|
||||
WEBUI_PORT=1455 \
|
||||
LOG_LEVEL=info \
|
||||
DEBUG=0
|
||||
|
||||
# 安装系统依赖
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
gcc \
|
||||
python3-dev \
|
||||
libnss3 \
|
||||
libatk-bridge2.0-0 \
|
||||
libdrm2 \
|
||||
libxkbcommon0 \
|
||||
libgbm1 \
|
||||
libasound2t64 \
|
||||
libxshmfence1 \
|
||||
libxcomposite1 \
|
||||
libxdamage1 \
|
||||
libxfixes3 \
|
||||
libxrandr2 \
|
||||
libx11-xcb1 \
|
||||
libpango-1.0-0 \
|
||||
libcairo2 \
|
||||
fonts-liberation \
|
||||
libdbus-1-3 \
|
||||
libexpat1 \
|
||||
libcups2t64 \
|
||||
libxtst6 \
|
||||
libxi6 \
|
||||
libxext6 \
|
||||
libxss1 \
|
||||
unzip \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir --upgrade pip \
|
||||
&& pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# 安装 Chromium 浏览器(从预下载的压缩包)
|
||||
COPY chrome-linux64.zip /tmp/chrome-linux64.zip
|
||||
RUN mkdir -p /opt/chromium && \
|
||||
unzip -q /tmp/chrome-linux64.zip -d /opt/chromium && \
|
||||
rm /tmp/chrome-linux64.zip && \
|
||||
chmod +x /opt/chromium/chrome-linux64/chrome
|
||||
ENV PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/opt/chromium/chrome-linux64/chrome
|
||||
|
||||
COPY . .
|
||||
|
||||
EXPOSE 1455
|
||||
|
||||
CMD ["python", "webui.py"]
|
||||
Reference in New Issue
Block a user