Spaces:
Paused
Paused
| FROM python:3.11-slim | |
| ENV DEBIAN_FRONTEND=noninteractive \ | |
| TZ=UTC \ | |
| PLAYWRIGHT_BROWSERS_PATH=/ms-playwright \ | |
| DISPLAY=:99 | |
| RUN apt-get update && apt-get install -y \ | |
| wget \ | |
| curl \ | |
| gnupg \ | |
| xvfb \ | |
| x11vnc \ | |
| fluxbox \ | |
| tor \ | |
| torsocks \ | |
| libnss3 \ | |
| libatk-bridge2.0-0 \ | |
| libdrm2 \ | |
| libxkbcommon0 \ | |
| libgbm1 \ | |
| libasound2 \ | |
| libxcomposite1 \ | |
| libxdamage1 \ | |
| libxrandr2 \ | |
| libpango-1.0-0 \ | |
| libcairo2 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| RUN pip install playwright && \ | |
| playwright install chromium && \ | |
| playwright install-deps | |
| COPY agent_core.py . | |
| COPY space.py . | |
| # Create /etc/tor before writing config | |
| RUN mkdir -p /etc/tor && \ | |
| echo "SOCKSPort 9050" >> /etc/tor/torrc && \ | |
| echo "ControlPort 9051" >> /etc/tor/torrc && \ | |
| echo "CookieAuthentication 0" >> /etc/tor/torrc | |
| CMD ["sh", "-c", "Xvfb :99 -screen 0 1920x1080x24 & tor & python space.py"] |