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]>
- 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 |
-
#
|
| 20 |
-
|
|
|
|
| 21 |
|
| 22 |
-
#
|
| 23 |
-
|
| 24 |
|
| 25 |
-
#
|
| 26 |
-
|
| 27 |
-
RUN uv pip install -e .
|
| 28 |
|
| 29 |
-
#
|
| 30 |
-
|
| 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
|