mirror of
https://huggingface.co/spaces/Catapang1989/aniscrap
synced 2026-04-17 15:51:46 +00:00
Update Dockerfile
This commit is contained in:
17
Dockerfile
17
Dockerfile
@@ -1,20 +1,15 @@
|
|||||||
# Use the official Playwright image which includes all browser dependencies
|
FROM mcr.microsoft.com/playwright/python:v1.58.0-jammy
|
||||||
FROM mcr.microsoft.com/playwright/python:v1.40.0-jammy
|
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Install Xvfb (Virtual Display)
|
|
||||||
RUN apt-get update && apt-get install -y xvfb
|
|
||||||
|
|
||||||
# Install Python requirements
|
|
||||||
COPY requirements.txt .
|
COPY requirements.txt .
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
# Copy your application code
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Set environment variable to run Headful
|
ENV HEADLESS="true"
|
||||||
ENV HEADLESS="false"
|
ENV PORT=7860
|
||||||
|
|
||||||
# Run Uvicorn wrapped in Xvfb (This simulates a monitor so Playwright thinks it's a real computer)
|
EXPOSE $PORT
|
||||||
CMD xvfb-run -a uvicorn main:app --host 0.0.0.0 --port 7860
|
|
||||||
|
CMD ["python", "main.py"]
|
||||||
Reference in New Issue
Block a user