-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.pc
More file actions
40 lines (32 loc) · 887 Bytes
/
Dockerfile.pc
File metadata and controls
40 lines (32 loc) · 887 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
38
39
40
FROM python:3.9-slim
# Set working directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
libgl1-mesa-glx \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender-dev \
libgtk-3-0 \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Install additional packages for NetworkTables and OpenCV
RUN pip install --no-cache-dir \
opencv-python-headless \
pynetworktables \
numpy \
tensorflow \
tflite-runtime
# Copy the application code
COPY . .
# Create directories if they don't exist
RUN mkdir -p models
RUN mkdir -p config
# Set environment variables
ENV PYTHONUNBUFFERED=1
ENV PYTHONPATH=/app
# Default command (can be overridden from docker-compose)
CMD ["python", "main.py", "--config", "config/pc_config.json"]