Spaces:
Sleeping
Sleeping
File size: 773 Bytes
aed647b 81e9434 c355737 aed647b 81e9434 aed647b 761e7c0 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | FROM python:3.11-slim
RUN apt-get update && \
apt-get install -y --no-install-recommends \
chromium chromium-driver fonts-liberation libgbm1 libnss3 libgconf-2-4 && \
rm -rf /var/lib/apt/lists/*
ENV CHROME_BINARY=/usr/bin/chromium
ENV CHROME_EXTRA_ARGS="--no-sandbox --disable-dev-shm-usage --disable-gpu --window-size=1920,1080 --headless=new"
ENV HOME=/tmp
ENV XDG_CACHE_HOME=/tmp/.cache
ENV SELENIUM_MANAGER_CACHE_DIR=/tmp/selenium
ENV TMPDIR=/tmp
RUN mkdir -p /tmp/.cache /tmp/selenium && chmod -R 777 /tmp/.cache /tmp/selenium
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . /app
WORKDIR /app
CMD ["gunicorn", "-w", "1", "--threads","1","-k","uvicorn.workers.UvicornWorker","--bind","0.0.0.0:8080","app.main:app"]
|