-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdockerfile
More file actions
37 lines (28 loc) · 948 Bytes
/
dockerfile
File metadata and controls
37 lines (28 loc) · 948 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Dockerfile
FROM python:3.9-slim
# Add metadata labels
LABEL maintainer="Ashley Pilger <my@example.com>"
LABEL version="1.0"
LABEL description="GuardianSensor - mmWave Radar Child Safety System"
LABEL repository="https://github.com/KazeAsh/GuardianSensor"
WORKDIR /app
# Copy requirements first for better caching
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Create necessary directories
RUN mkdir -p data/raw/mmwave
RUN mkdir -p data/processed
RUN mkdir -p outputs/visualizations
RUN mkdir -p outputs/reports
RUN mkdir -p outputs/logs
# Expose port
EXPOSE 8000
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \
CMD curl -f http://localhost:8000/health || exit 1
# Run the application
CMD ["uvicorn", "api.main:app", "--host", "0.0.0.0", "--port", "8000"]