Create Dockerfile
Browse files- Dockerfile +22 -0
Dockerfile
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM mcr.microsoft.com/playwright/python:v1.49.0-jammy
|
| 2 |
+
|
| 3 |
+
WORKDIR /code
|
| 4 |
+
|
| 5 |
+
# Install Python dependencies
|
| 6 |
+
COPY requirements.txt .
|
| 7 |
+
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 8 |
+
|
| 9 |
+
# Install Browsers
|
| 10 |
+
RUN playwright install chromium
|
| 11 |
+
|
| 12 |
+
# Copy App Code
|
| 13 |
+
COPY . .
|
| 14 |
+
|
| 15 |
+
# Create directory for saving sessions with permissions
|
| 16 |
+
RUN mkdir -p /code/data && chmod -R 777 /code/data
|
| 17 |
+
|
| 18 |
+
# Expose Streamlit Port
|
| 19 |
+
EXPOSE 8501
|
| 20 |
+
|
| 21 |
+
# Run Streamlit
|
| 22 |
+
CMD ["streamlit", "run", "app.py", "--server.address=0.0.0.0", "--server.port=8501", "--server.headless=true"]
|