Skip to content

Commit

Permalink
fix playwright
Browse files Browse the repository at this point in the history
  • Loading branch information
oeway committed Aug 20, 2024
1 parent 56dbacf commit 4bf3e94
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,20 @@ RUN conda update -n base -c defaults conda -y && \
# Copy all files to the container
ADD . .

# Install Python dependencies
RUN pip install .[server-apps] --no-cache-dir
# Install Python dependencies and Playwright
RUN pip install .[server-apps] --no-cache-dir && \
pip install playwright --no-cache-dir && \
playwright install

# Move Playwright .cache folder to the hypha user's home directory
RUN mkdir -p /home/hypha/.cache && \
mv /root/.cache/ms-playwright /home/hypha/.cache/ && \
chown -R hypha:hypha /home/hypha/.cache

# Add user and switch to non-root user
RUN useradd -u 8877 hypha
USER hypha

# Install Playwright browsers as the hypha user
RUN playwright install --with-deps

# Expose port
EXPOSE 9520

Expand Down

0 comments on commit 4bf3e94

Please sign in to comment.