Update Dockerfile
Browse files- Dockerfile +8 -5
Dockerfile
CHANGED
|
@@ -1,15 +1,18 @@
|
|
| 1 |
-
# Use
|
| 2 |
FROM ://microsoft.com
|
| 3 |
|
| 4 |
# Set work directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
# Install
|
| 8 |
RUN pip install fastapi uvicorn playwright-stealth
|
| 9 |
RUN playwright install chromium
|
| 10 |
|
| 11 |
-
#
|
| 12 |
COPY . .
|
| 13 |
|
| 14 |
-
#
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use the official Microsoft Playwright image
|
| 2 |
FROM ://microsoft.com
|
| 3 |
|
| 4 |
# Set work directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# Install dependencies
|
| 8 |
RUN pip install fastapi uvicorn playwright-stealth
|
| 9 |
RUN playwright install chromium
|
| 10 |
|
| 11 |
+
# Copy your main.py (make sure you created main.py in the Space too)
|
| 12 |
COPY . .
|
| 13 |
|
| 14 |
+
# Hugging Face uses port 7860
|
| 15 |
+
EXPOSE 7860
|
| 16 |
+
|
| 17 |
+
# Run the API
|
| 18 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|