【Sionna】docker build ubuntu cuda

改动之后

bash 复制代码
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements.  See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1  (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# *      http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# *      contact@openairinterface.org
# */
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
#   Valid for Ubuntu 24.04
#
#---------------------------------------------------------------------

ARG DOCKER_CUSTOM_IMAGE_TAG=latest
FROM ran-base-cuda:${DOCKER_CUSTOM_IMAGE_TAG} AS ran-build-cuda
ARG BUILD_OPTION
ARG FLEXRIC_BUILD_OPTIONS
ARG NVIDIA_DRIVER_CAPABILITIES=all
ARG E2AP_VERSION=E2AP_V3
ARG KPM_VERSION=KPM_V3_00

# TensorRT 11 plan builds use ModelOpt to convert ONNX models to FP16.
# Isolate pip dependencies from apt-managed Python packages (e.g. NumPy).
RUN apt-get update && \
    apt-get install --yes --no-install-recommends python3-venv && \
    rm -rf /var/lib/apt/lists/* && \
    python3 -m venv /opt/modelopt-venv && \
    /opt/modelopt-venv/bin/python3 -m pip install --no-cache-dir 'nvidia-modelopt[onnx]' && \
    /opt/modelopt-venv/bin/python3 -c "import modelopt.onnx.autocast"

RUN rm -Rf /oai-ran
WORKDIR /oai-ran

# Copy OAI and plugins from sionna-rk context
COPY ext/openairinterface5g/ .
COPY plugins/ plugins/

# build all targets so final targets can be created afterwards
RUN \
   # Mount CCache cache direrctory
   --mount=type=cache,target=/root/.cache/ccache/ \
   # Mount CPM package cache
   --mount=type=cache,target=/root/.cache/cpm/ \
    /bin/sh oaienv && \
    cd cmake_targets && \
    mkdir -p log && \
    ./build_oai -c --ninja \
      --eNB --gNB --RU --UE --nrUE \
      --build-lib "telnetsrv enbscope uescope nrscope" \
      -w USRP -t Ethernet \
      --build-e2 --cmake-opt -DKPM_VERSION=$KPM_VERSION --cmake-opt -DE2AP_VERSION=$E2AP_VERSION \
      --noavx512 \
      --build-tool-opt -k10 \
      --cmake-opt -DCMAKE_C_FLAGS="-Werror" --cmake-opt -DCMAKE_CXX_FLAGS="-Werror" $BUILD_OPTION && \
    # Mainly to see if the sanitize option was perfectly executed
    echo "---- ldd on executables ----" && \
    ldd ran_build/build/*softmodem* ran_build/build/nr-cuup ran_build/build/oairu && \
    echo "---- ldd on shared libraries ----" && \
    ldd ran_build/build/*.so

## Build FlexRIC for SM Models
RUN \
    # Mount CCache cache direrctory
    --mount=type=cache,target=/root/.cache/ccache/ \
    mkdir -p openair2/E2AP/flexric/build && \
    cd openair2/E2AP/flexric/build && \
    cmake -GNinja -DCMAKE_BUILD_TYPE=Release \
          -DKPM_VERSION=$KPM_VERSION \
          -DE2AP_VERSION=$E2AP_VERSION $FLEXRIC_BUILD_OPTIONS .. && \
    ninja && \
    ninja install

# Use the ModelOpt environment for plugin plan builds launched via docker run.
# Set PATH after compilation so OAI builds keep using the system Python.
ENV PATH="/opt/modelopt-venv/bin:${PATH}"
相关推荐
always20221 天前
AI运行时 · 06 - Kata 与 K8s 集成:RuntimeClass / CSI kata-directvolume / 性能开销与调优
人工智能·容器·kubernetes
csdn_aspnet2 天前
使用 Docker 配置 PostgreSQL 和 pgAdmin 4
数据库·docker·postgresql·pgadmin4
Maiko Star2 天前
Docker保姆级部署AI应用程序(FastAPI)
docker·容器·fastapi
Lansonli2 天前
大数据Spark(九十五):Spark Shuffle 参数调优全解析
大数据·分布式·spark
A-刘晨阳2 天前
Kubernetes 查询证书有效期及续签证书(适用于二进制部署)
云原生·容器·kubernetes·证书·cfssl
Nefu_lyh2 天前
【Spark】05Spark 数据读取与保存:文件格式、文件系统与结构化数据
大数据·分布式·spark
`Levie2 天前
Docker-安装部署、容器管理(一)
docker·容器·eureka
Diligently_3 天前
第 08 篇|单机部署:本地安装与 Docker 最佳实践
运维·spring boot·docker
FungLeo3 天前
FengCMS·PHP+MySQL 升级实录 ·本地容器环境设计:只读挂载、LOCAL_UID、数据卷权限
开发语言·mysql·docker·php·fengcms
丘山录3 天前
本地部署 DGX Spark,200G 网卡挂在 4 条通道上
服务器·人工智能·spark·持续部署