simoncck commited on
Commit
e7cf110
·
verified ·
1 Parent(s): b38bd40

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -6
Dockerfile CHANGED
@@ -7,7 +7,6 @@ ENV PYTHONDONTWRITEBYTECODE=1
7
 
8
  # Create user for security (required by Hugging Face Spaces)
9
  RUN useradd -m -u 1000 user
10
- USER user
11
 
12
  # Set environment paths
13
  ENV HOME=/home/user \
@@ -47,20 +46,20 @@ RUN apt-get update && apt-get install -y \
47
  xdg-utils \
48
  && rm -rf /var/lib/apt/lists/*
49
 
50
- # Switch back to user
51
- USER user
52
-
53
  # Copy requirements first for better caching
54
- COPY --chown=user requirements.txt .
55
 
56
  # Install Python dependencies
57
  RUN pip install --no-cache-dir --upgrade pip
58
  RUN pip install --no-cache-dir -r requirements.txt
59
 
60
- # Install Playwright browsers
61
  RUN playwright install chromium
62
  RUN playwright install-deps chromium
63
 
 
 
 
64
  # Copy application code
65
  COPY --chown=user . .
66
 
 
7
 
8
  # Create user for security (required by Hugging Face Spaces)
9
  RUN useradd -m -u 1000 user
 
10
 
11
  # Set environment paths
12
  ENV HOME=/home/user \
 
46
  xdg-utils \
47
  && rm -rf /var/lib/apt/lists/*
48
 
 
 
 
49
  # Copy requirements first for better caching
50
+ COPY requirements.txt .
51
 
52
  # Install Python dependencies
53
  RUN pip install --no-cache-dir --upgrade pip
54
  RUN pip install --no-cache-dir -r requirements.txt
55
 
56
+ # Install Playwright browsers and their dependencies as root
57
  RUN playwright install chromium
58
  RUN playwright install-deps chromium
59
 
60
+ # Switch back to user
61
+ USER user
62
+
63
  # Copy application code
64
  COPY --chown=user . .
65