-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathDockerfile.rapids
More file actions
40 lines (29 loc) · 1.06 KB
/
Dockerfile.rapids
File metadata and controls
40 lines (29 loc) · 1.06 KB
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
# NVIDIA RAPIDS Demand Forecasting Agent
# Docker setup for GPU-accelerated forecasting with cuML
FROM nvcr.io/nvidia/rapidsai/rapidsai:24.02-cuda12.0-runtime-ubuntu22.04-py3.10
# Set working directory
WORKDIR /app
# Install additional dependencies
RUN pip install asyncpg psycopg2-binary xgboost
# Copy application files
COPY scripts/forecasting/rapids_gpu_forecasting.py /app/rapids_forecasting_agent.py
COPY requirements.txt /app/
# Install Python dependencies
RUN pip install -r requirements.txt
# Set environment variables
ENV CUDA_VISIBLE_DEVICES=0
ENV NVIDIA_VISIBLE_DEVICES=all
ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility
# Create data directory
RUN mkdir -p /app/data
# Create non-root user for security
# Security: Run container as non-privileged user to prevent privilege escalation
RUN groupadd -r rapidsuser && \
useradd -r -g rapidsuser -u 1000 rapidsuser && \
chown -R rapidsuser:rapidsuser /app
# Switch to non-root user
USER rapidsuser
# Expose port for API (if needed)
EXPOSE 8002
# Default command
CMD ["python", "rapids_forecasting_agent.py"]