Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +5 -9
Dockerfile
CHANGED
|
@@ -4,10 +4,7 @@ FROM mcr.microsoft.com/playwright/python:v1.41.0-jammy
|
|
| 4 |
# Set working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
#
|
| 8 |
-
RUN apt-get update && apt-get install -y xvfb libx11-xcb1 libxcb-dri3-0 libxcomposite1 libxcursor1 libxdamage1 libxi6 libxtst6 libnss3 libcups2 libxss1 libxrandr2 libasound2 libpangocairo-1.0-0 libatk1.0-0 libatk-bridge2.0-0 libgtk-3-0
|
| 9 |
-
|
| 10 |
-
# Copy requirements and install
|
| 11 |
COPY requirements.txt .
|
| 12 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 13 |
|
|
@@ -17,12 +14,11 @@ RUN playwright install chromium
|
|
| 17 |
# Copy all project files
|
| 18 |
COPY . .
|
| 19 |
|
| 20 |
-
# Grant permissions
|
| 21 |
RUN chmod -R 777 /app
|
| 22 |
|
| 23 |
-
# Expose the port
|
| 24 |
EXPOSE 7860
|
| 25 |
|
| 26 |
-
#
|
| 27 |
-
|
| 28 |
-
CMD ["xvfb-run", "--auto-servernum", "--server-args='-screen 0 1280x1024x24'", "python", "app.py"]
|
|
|
|
| 4 |
# Set working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# Copy dependency file and install Python packages
|
|
|
|
|
|
|
|
|
|
| 8 |
COPY requirements.txt .
|
| 9 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 10 |
|
|
|
|
| 14 |
# Copy all project files
|
| 15 |
COPY . .
|
| 16 |
|
| 17 |
+
# Grant permissions (Hugging Face needs this)
|
| 18 |
RUN chmod -R 777 /app
|
| 19 |
|
| 20 |
+
# Expose the port Hugging Face expects
|
| 21 |
EXPOSE 7860
|
| 22 |
|
| 23 |
+
# Run the application (Simple command)
|
| 24 |
+
CMD ["python", "app.py"]
|
|
|