mirror of
https://huggingface.co/spaces/Catapang1989/aniscrap
synced 2026-04-17 15:51:46 +00:00
Update Dockerfile
This commit is contained in:
@@ -1,24 +1,15 @@
|
|||||||
# Use the official Microsoft Playwright image (Includes all necessary Chromium dependencies)
|
|
||||||
FROM mcr.microsoft.com/playwright/python:v1.58.0-jammy
|
FROM mcr.microsoft.com/playwright/python:v1.58.0-jammy
|
||||||
|
|
||||||
# Set the working directory
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Copy requirement files first (for Docker layer caching)
|
|
||||||
COPY requirements.txt .
|
COPY requirements.txt .
|
||||||
|
|
||||||
# Install Python packages
|
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
# Copy the rest of the application code
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Set environment variables for production cloud deployment
|
|
||||||
ENV HEADLESS="true"
|
ENV HEADLESS="true"
|
||||||
ENV PORT=7860
|
ENV PORT=7860
|
||||||
|
|
||||||
# Expose the application port
|
|
||||||
EXPOSE $PORT
|
EXPOSE $PORT
|
||||||
|
|
||||||
# Run the FastAPI server via Uvicorn
|
|
||||||
CMD ["python", "main.py"]
|
CMD ["python", "main.py"]
|
||||||
Reference in New Issue
Block a user