Update Dockerfile
Browse files- Dockerfile +7 -3
Dockerfile
CHANGED
@@ -35,8 +35,12 @@ COPY . /app/
|
|
35 |
# Install any needed packages specified in requirements.txt
|
36 |
RUN pip install --no-cache-dir -r requirements.txt
|
37 |
|
38 |
-
# Install Playwright browsers
|
39 |
-
|
|
|
|
|
|
|
|
|
40 |
|
41 |
# Make port available to the world outside this container (if you add a server later)
|
42 |
# EXPOSE 8000
|
@@ -47,4 +51,4 @@ RUN playwright install chromium
|
|
47 |
# ENV HUGGINGFACE_PASSWORD=your_password
|
48 |
|
49 |
# Run the app when the container launches
|
50 |
-
CMD ["python", "app.py"]
|
|
|
35 |
# Install any needed packages specified in requirements.txt
|
36 |
RUN pip install --no-cache-dir -r requirements.txt
|
37 |
|
38 |
+
# Install Playwright browsers *before* running the script, and use PLAYWRIGHT_BROWSERS_PATH
|
39 |
+
# This ensures the browsers are installed in a location Playwright can find them.
|
40 |
+
ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
|
41 |
+
RUN mkdir -p $PLAYWRIGHT_BROWSERS_PATH \
|
42 |
+
&& playwright install chromium --with-deps
|
43 |
+
|
44 |
|
45 |
# Make port available to the world outside this container (if you add a server later)
|
46 |
# EXPOSE 8000
|
|
|
51 |
# ENV HUGGINGFACE_PASSWORD=your_password
|
52 |
|
53 |
# Run the app when the container launches
|
54 |
+
CMD ["python", "app.py.py"]
|