Spaces:
Paused

pro / Dockerfile
peppe000's picture
Update Dockerfile
4558e38 verified
Raw History Blame Contribute Delete
2.2 kB
FROM python:3.12-slim-bookworm
ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHONUNBUFFERED=1 ENV PYTHONDONTWRITEBYTECODE=1
ENV FLARESOLVERR_URL=http://127.0.0.1:8191
ENV BYPARR_URL=http://127.0.0.1:8192
ENV PORT=7860
ENV HOST=0.0.0.0
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends \
chromium \
chromium-driver \
fonts-liberation \
fonts-freefont-ttf \
libglib2.0-0 \
libnss3 \
libnspr4 \
libatk1.0-0 \
libatk-bridge2.0-0 \
libcups2 \
libdrm2 \
libdbus-1-3 \
libxkbcommon0 \
libxcomposite1 \
libxdamage1 \
libxfixes3 \
libxrandr2 \
libgbm1 \
libasound2 \
libpango-1.0-0 \
libcairo2 \
libatspi2.0-0 \
libxshmfence1 \
libgl1 \
libglx0 \
libx11-xcb1 \
libxcb1 \
libxext6 \
libxi6 \
libxtst6 \
curl \
&& rm -rf /var/lib/apt/lists/* \
&& chmod +x /usr/bin/chromedriver
RUN git clone --depth 1 https://github.com/FlareSolverr/FlareSolverr.git /app/flaresolverr \
&& cd /app/flaresolverr && pip install --no-cache-dir -r requirements.txt \
&& echo '{"solver":{"webdriverHost":"http://127.0.0.1:4444","logsLevel":"error"}}' > /app/flaresolverr/config.json
RUN git clone --depth 1 https://github.com/ThePhaseless/Byparr.git /app/byparr \
&& cd /app/byparr \
&& sed -i 's/requires-python = ".*"/requires-python = ">=3.11, <3.14"/' pyproject.toml \
&& pip install --no-cache-dir -e .
RUN python -m camoufox fetch || true
RUN git init . && git remote add origin https://github.com/realbestia1/EasyProxy \
&& git fetch --depth 1 main && git checkout -f main \
&& pip install --no-cache-dir -r requirements.txt
RUN python -m playwright install chromium && python -m playwright install-deps chromium
HEALTHCHECK --interval=10s --timeout=5s --start-period=30s --retries=3 \
CMD curl -sf http://127.0.0.1:7860/health >/dev/null || exit 1
EXPOSE 7860
CMD bash -c 'cd /app/flaresolverr && node server.js & cd /app/byparr && python -m byparr --host 127.0.0.1 --port 8192 & cd /app && python app.py'