Spaces:
Running
Running
Trisha Tomy
commited on
Commit
·
dab2696
1
Parent(s):
462e339
moved around perm workaround
Browse files- Dockerfile +11 -12
Dockerfile
CHANGED
@@ -16,28 +16,27 @@ RUN apt-get update && apt-get install -y \
|
|
16 |
# Copy common Python dependencies first (needed for pip installs)
|
17 |
COPY requirements.txt .
|
18 |
|
19 |
-
# --- START: Core Python and proxy-lite setup ---
|
20 |
# Copy your Flask application code (app.py) and other project files.
|
21 |
COPY . .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
# Upgrade pip, setuptools, and wheel for a robust Python build environment.
|
23 |
RUN pip install --no-cache-dir --upgrade pip setuptools wheel
|
24 |
|
25 |
-
# Install proxy-lite in
|
26 |
-
# The Playwright base image already has Playwright installed, so this just handles proxy-lite
|
27 |
-
# RUN pip install --no-cache-dir --no-input --force-reinstall -e git+https://github.com/convergence-ai/proxy-lite.git#egg=proxy-lite
|
28 |
RUN pip install --no-cache-dir --no-input -e .
|
|
|
29 |
# Install the rest of the Python dependencies from requirements.txt
|
30 |
RUN pip install --no-cache-dir -r requirements.txt
|
31 |
|
32 |
|
33 |
-
|
34 |
-
# --- START: Directory permission workaround ---
|
35 |
-
# Create the directory proxy-lite's recorder insists on writing to
|
36 |
-
# and grant full permissions. This addresses the PermissionError.
|
37 |
-
RUN mkdir -p /app/src/proxy-lite/local_trajectories \
|
38 |
-
&& chmod -R 777 /app/src/proxy-lite/local_trajectories
|
39 |
-
# --- END: Directory permission workaround ---
|
40 |
-
|
41 |
# Set environment variables required for Playwright at runtime
|
42 |
ENV DISPLAY=:99
|
43 |
ENV XDG_RUNTIME_DIR=/tmp
|
|
|
16 |
# Copy common Python dependencies first (needed for pip installs)
|
17 |
COPY requirements.txt .
|
18 |
|
|
|
19 |
# Copy your Flask application code (app.py) and other project files.
|
20 |
COPY . .
|
21 |
+
|
22 |
+
# --- START: Directory permission workaround ---
|
23 |
+
# Create the directory proxy-lite's recorder insists on writing to
|
24 |
+
# and grant full permissions. This addresses the PermissionError.
|
25 |
+
# This line creates the directory *directly* under /app, which is now the correct path
|
26 |
+
RUN mkdir -p /app/local_trajectories \
|
27 |
+
&& chmod -R 777 /app/local_trajectories
|
28 |
+
# --- END: Directory permission workaround ---
|
29 |
+
|
30 |
# Upgrade pip, setuptools, and wheel for a robust Python build environment.
|
31 |
RUN pip install --no-cache-dir --upgrade pip setuptools wheel
|
32 |
|
33 |
+
# Install your local proxy-lite package in editable mode.
|
|
|
|
|
34 |
RUN pip install --no-cache-dir --no-input -e .
|
35 |
+
|
36 |
# Install the rest of the Python dependencies from requirements.txt
|
37 |
RUN pip install --no-cache-dir -r requirements.txt
|
38 |
|
39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
# Set environment variables required for Playwright at runtime
|
41 |
ENV DISPLAY=:99
|
42 |
ENV XDG_RUNTIME_DIR=/tmp
|