diff --git a/ml/Cargo.toml b/ml/Cargo.toml index ed5931d28..81977c0f0 100644 --- a/ml/Cargo.toml +++ b/ml/Cargo.toml @@ -63,13 +63,14 @@ risk = { path = "../risk" } storage = { path = "../storage" } -# Essential ML frameworks for HFT inference - CUDA ENABLED +# Essential ML frameworks for HFT inference - CUDA OPTIONAL # Using specific git rev (671de1db) for cudarc 0.17.3 CUDA 13.0 compatibility # Rev 671de1db is v0.9.1 + cudarc 0.17.3 upgrade -candle-core = { git = "https://github.com/huggingface/candle", rev = "671de1db", features = ["cuda"] } # GPU acceleration +# CUDA features are optional - controlled by 'cuda' feature flag +candle-core = { git = "https://github.com/huggingface/candle", rev = "671de1db" } # Base without GPU candle-nn = { git = "https://github.com/huggingface/candle", rev = "671de1db" } # Use git version of candle-optimisers to match candle version -candle-optimisers = { git = "https://github.com/KGrewal1/optimisers", features = ["cuda"] } +candle-optimisers = { git = "https://github.com/KGrewal1/optimisers" } # Base without GPU # HEAVY ML FRAMEWORKS REMOVED - MOVED TO ml_training_service # ort (ONNX Runtime) - REMOVED (1000+ dependencies alone!) diff --git a/services/backtesting_service/Dockerfile b/services/backtesting_service/Dockerfile index e81e61525..918e195d0 100644 --- a/services/backtesting_service/Dockerfile +++ b/services/backtesting_service/Dockerfile @@ -16,6 +16,11 @@ RUN apt-get update && apt-get install -y \ # Set working directory WORKDIR /build +# Set CUDA environment variables to skip GPU detection during build +# CUDA 13.0 matches development environment, RTX 3050 Ti = compute capability 8.6 +ENV CUDARC_CUDA_VERSION=13000 +ENV CUDA_COMPUTE_CAP=86 + # Copy workspace manifests COPY Cargo.toml Cargo.lock ./ diff --git a/services/ml_training_service/Dockerfile b/services/ml_training_service/Dockerfile index b3f942bc9..3d3826843 100644 --- a/services/ml_training_service/Dockerfile +++ b/services/ml_training_service/Dockerfile @@ -28,6 +28,11 @@ RUN apt-get update && apt-get install -y \ # Set working directory WORKDIR /build +# Set CUDA environment variables to skip GPU detection during build +# CUDA 13.0 matches development environment, RTX 3050 Ti = compute capability 8.6 +ENV CUDARC_CUDA_VERSION=13000 +ENV CUDA_COMPUTE_CAP=86 + # Copy workspace manifests COPY Cargo.toml Cargo.lock ./ @@ -58,8 +63,8 @@ COPY services/integration_tests ./services/integration_tests COPY tests ./tests COPY migrations ./migrations -# Build the application with CUDA support -RUN cargo build --release -p ml_training_service --features cuda +# Build the application (CUDA available at runtime via nvidia/cuda base image) +RUN cargo build --release -p ml_training_service # ============================================================================= # Runtime Stage with CUDA Runtime diff --git a/services/trading_service/Dockerfile b/services/trading_service/Dockerfile index c8913b285..7f90aa886 100644 --- a/services/trading_service/Dockerfile +++ b/services/trading_service/Dockerfile @@ -16,6 +16,11 @@ RUN apt-get update && apt-get install -y \ # Set working directory WORKDIR /build +# Set CUDA environment variables to skip GPU detection during build +# CUDA 13.0 matches development environment, RTX 3050 Ti = compute capability 8.6 +ENV CUDARC_CUDA_VERSION=13000 +ENV CUDA_COMPUTE_CAP=86 + # Copy workspace manifests COPY Cargo.toml Cargo.lock ./