Skip to content

Commit 39a9d0b

Browse files
feat(fault-injection): Add fault injection API service (#4042)
Signed-off-by: Harrison King Saturley-Hall <[email protected]> Co-authored-by: Harrison King Saturley-Hall <[email protected]>
1 parent ea9d00e commit 39a9d0b

File tree

3 files changed

+1752
-0
lines changed

3 files changed

+1752
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
FROM python:3.12-slim
6+
7+
WORKDIR /app
8+
9+
# Install system dependencies
10+
RUN apt-get update && apt-get install -y --no-install-recommends \
11+
curl \
12+
&& rm -rf /var/lib/apt/lists/*
13+
14+
# Copy requirements and install Python dependencies
15+
COPY requirements.txt .
16+
RUN pip install --no-cache-dir -r requirements.txt
17+
18+
# Copy application code
19+
COPY main.py .
20+
21+
# Health check
22+
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
23+
CMD curl -f http://localhost:8080/health || exit 1
24+
25+
# Run as non-root user
26+
RUN useradd -m -u 1000 faultinjection && chown -R faultinjection:faultinjection /app
27+
USER faultinjection
28+
29+
EXPOSE 8080
30+
31+
CMD ["python", "main.py"]
32+

0 commit comments

Comments
 (0)