GitHub Actions commited on
Commit
a3a48cf
·
1 Parent(s): e53f293

Deploy backend from GitHub Actions

Browse files

🚀 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

Files changed (1) hide show
  1. Dockerfile +9 -9
Dockerfile CHANGED
@@ -16,18 +16,18 @@ COPY pyproject.toml requirements.txt README.md ./
16
  # Install uv for faster dependency installation
17
  RUN pip install uv
18
 
19
- # Create a non-root user for security
20
- RUN useradd -m -u 1000 user && chown -R user:user /app
 
21
 
22
- # Switch to non-root user
23
- USER user
24
 
25
- # Install Python dependencies using uv for better caching
26
- # Note: Not using --system to avoid permission issues
27
- RUN uv pip install -e .
28
 
29
- # Copy the rest of the application code
30
- COPY --chown=user:user . .
31
 
32
  # Expose the port (HF Spaces default)
33
  EXPOSE 7860
 
16
  # Install uv for faster dependency installation
17
  RUN pip install uv
18
 
19
+ # Install Python dependencies as root (with --system)
20
+ # We'll change user after installation
21
+ RUN uv pip install --system -e .
22
 
23
+ # Copy the rest of the application code
24
+ COPY . .
25
 
26
+ # Create a non-root user for security (after dependencies are installed)
27
+ RUN useradd -m -u 1000 user && chown -R user:user /app
 
28
 
29
+ # Switch to non-root user for running the application
30
+ USER user
31
 
32
  # Expose the port (HF Spaces default)
33
  EXPOSE 7860