Spaces:
Sleeping
Sleeping
Commit ·
c56d6fc
1
Parent(s): fe6601c
issue
Browse files- Dockerfile +6 -10
Dockerfile
CHANGED
|
@@ -17,13 +17,10 @@ RUN apt-get update && apt-get install -y \
|
|
| 17 |
libgbm1 \
|
| 18 |
libxkbcommon0 \
|
| 19 |
libasound2 \
|
| 20 |
-
|
|
|
|
| 21 |
&& rm -rf /var/lib/apt/lists/*
|
| 22 |
|
| 23 |
-
# Install Node.js and Playwright
|
| 24 |
-
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
|
| 25 |
-
apt-get install -y nodejs && npm install -g playwright
|
| 26 |
-
|
| 27 |
# Install Poetry
|
| 28 |
RUN pip install --no-cache-dir poetry
|
| 29 |
|
|
@@ -33,18 +30,17 @@ ENV POETRY_VIRTUALENVS_IN_PROJECT=true
|
|
| 33 |
# Copy dependency files first to improve caching
|
| 34 |
COPY pyproject.toml poetry.lock ./
|
| 35 |
|
|
|
|
| 36 |
RUN poetry install --no-root
|
| 37 |
|
| 38 |
# Copy the rest of the application files
|
| 39 |
COPY . .
|
| 40 |
|
| 41 |
-
# Install Playwright browsers
|
| 42 |
-
RUN playwright install
|
| 43 |
-
RUN poetry run playwright install chromium
|
| 44 |
-
RUN poetry run playwright install-deps
|
| 45 |
|
| 46 |
# Expose correct port
|
| 47 |
EXPOSE 7860
|
| 48 |
|
| 49 |
# Start the application
|
| 50 |
-
CMD ["poetry", "run", "uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 17 |
libgbm1 \
|
| 18 |
libxkbcommon0 \
|
| 19 |
libasound2 \
|
| 20 |
+
fonts-liberation \
|
| 21 |
+
xdg-utils \
|
| 22 |
&& rm -rf /var/lib/apt/lists/*
|
| 23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
# Install Poetry
|
| 25 |
RUN pip install --no-cache-dir poetry
|
| 26 |
|
|
|
|
| 30 |
# Copy dependency files first to improve caching
|
| 31 |
COPY pyproject.toml poetry.lock ./
|
| 32 |
|
| 33 |
+
# Install dependencies
|
| 34 |
RUN poetry install --no-root
|
| 35 |
|
| 36 |
# Copy the rest of the application files
|
| 37 |
COPY . .
|
| 38 |
|
| 39 |
+
# Install Playwright browsers properly
|
| 40 |
+
RUN poetry run python -m playwright install --with-deps chromium
|
|
|
|
|
|
|
| 41 |
|
| 42 |
# Expose correct port
|
| 43 |
EXPOSE 7860
|
| 44 |
|
| 45 |
# Start the application
|
| 46 |
+
CMD ["poetry", "run", "uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]
|