Update Dockerfile
Browse files- Dockerfile +14 -4
Dockerfile
CHANGED
|
@@ -34,9 +34,19 @@ RUN git clone https://github.com/browser-use/web-ui.git
|
|
| 34 |
# Set the working directory to the newly cloned repository.
|
| 35 |
WORKDIR /app/web-ui
|
| 36 |
|
| 37 |
-
# Install
|
| 38 |
-
RUN pip install uv
|
| 39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
&& playwright install chromium
|
| 41 |
|
| 42 |
# Expose the default port for the web application.
|
|
@@ -44,4 +54,4 @@ EXPOSE 7788
|
|
| 44 |
|
| 45 |
# Command to run the application when the container starts.
|
| 46 |
# We bind to 0.0.0.0 to make the web UI accessible from outside the container.
|
| 47 |
-
CMD ["python", "webui.py", "--ip", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 34 |
# Set the working directory to the newly cloned repository.
|
| 35 |
WORKDIR /app/web-ui
|
| 36 |
|
| 37 |
+
# Install uv first, then use it to create the virtual environment and install dependencies.
|
| 38 |
+
RUN pip install uv
|
| 39 |
+
|
| 40 |
+
# Create a virtual environment using uv.
|
| 41 |
+
RUN uv venv --python 3.11
|
| 42 |
+
|
| 43 |
+
# Set the PATH to include the virtual environment's binary directory.
|
| 44 |
+
ENV PATH="/app/web-ui/.venv/bin:$PATH"
|
| 45 |
+
|
| 46 |
+
RUN source .venv/bin/activate
|
| 47 |
+
|
| 48 |
+
# Install Python dependencies and the Chromium browser with Playwright within the venv.
|
| 49 |
+
RUN uv pip install -r requirements.txt \
|
| 50 |
&& playwright install chromium
|
| 51 |
|
| 52 |
# Expose the default port for the web application.
|
|
|
|
| 54 |
|
| 55 |
# Command to run the application when the container starts.
|
| 56 |
# We bind to 0.0.0.0 to make the web UI accessible from outside the container.
|
| 57 |
+
CMD ["python", "webui.py", "--ip", "0.0.0.0", "--port", "7860"]
|