Unable to import PyTorch in Jetson nano using Docker image

I have trouble importing PyTorch in my jetson nano (jetpack 4.4). I have successfully installed it from .whl file. please help.

==> Launching app...
Traceback (most recent call last):
  File "/code/catkin_ws/src/duckietown-safe-ml-demo/packages/safe_ml/src/ood_node.py", line 13, in <module>
    import torch
  File "/usr/local/lib/python3.8/dist-packages/torch/__init__.py", line 290, in <module>
    from torch._C import *  # noqa: F403
ImportError: /usr/local/lib/python3.8/dist-packages/torch/lib/../../torch.libs/libgomp-804f19d4.so.1.0.0: cannot allocate memory in static TLS block

I am able to build docker image successfully, but when I try to run image, at that time it says that this error.

please Help!!!

   # parameters
    ARG REPO_NAME="duckietown-safe-ml-demo"
    ARG DESCRIPTION="Safe ML on the Duckie Town Platform"
    ARG MAINTAINER="[email protected]"
    # pick an icon from: https://fontawesome.com/v4.7.0/icons/
    ARG ICON="cube"
    
    # ==================================================>
    # ==> Do not change the code below this line
    ARG ARCH=arm32v7
    ARG DISTRO=daffy
    ARG BASE_TAG=${DISTRO}-${ARCH}
    ARG BASE_IMAGE=dt-ros-commons
    ARG LAUNCHER=default
    
    # define base image
    FROM duckietown/${BASE_IMAGE}:${BASE_TAG} as BASE
    
    # Changed to have the full suite of DT-packages.
    #ARG AIDO_REGISTRY=docker.io
    #FROM ${AIDO_REGISTRY}/duckietown/dt-car-interface:${BASE_TAG} AS dt-car-interface
    #FROM ${AIDO_REGISTRY}/duckietown/dt-core:${BASE_TAG} AS base
    
    # recall all arguments
    ARG ARCH
    ARG DISTRO
    ARG REPO_NAME
    ARG DESCRIPTION
    ARG MAINTAINER
    ARG ICON
    ARG BASE_TAG
    ARG BASE_IMAGE
    ARG LAUNCHER
    
    # check build arguments
    RUN dt-build-env-check "${REPO_NAME}" "${MAINTAINER}" "${DESCRIPTION}"
    
    # define/create repository path
    ARG REPO_PATH="${CATKIN_WS_DIR}/src/${REPO_NAME}"
    ARG LAUNCH_PATH="${LAUNCH_DIR}/${REPO_NAME}"
    RUN mkdir -p "${REPO_PATH}"
    RUN mkdir -p "${LAUNCH_PATH}"
    #WORKDIR "${REPO_PATH}"
    WORKDIR /code
    #COPY --from=dt-car-interface ${CATKIN_WS_DIR}/src/dt-car-interface ${CATKIN_WS_DIR}/src/dt-car-interface
    
    # keep some arguments as environment variables
    ENV DT_MODULE_TYPE "${REPO_NAME}"
    ENV DT_MODULE_DESCRIPTION "${DESCRIPTION}"
    ENV DT_MODULE_ICON "${ICON}"
    ENV DT_MAINTAINER "${MAINTAINER}"
    ENV DT_REPO_PATH "${REPO_PATH}"
    ENV DT_LAUNCH_PATH "${LAUNCH_PATH}"
    ENV DT_LAUNCHER "${LAUNCHER}"
    
    # Daniel - Add some dependencies
    RUN apt-get update -y && apt-get install -y --no-install-recommends 
             gcc 
             libc-dev
             git 
             bzip2 
             python3-tk 
             python3-wheel 
             python3-pip  
             python3-pillow  
             software-properties-common 
             #Pytorch dependencies
             libopenblas-dev 
             libblas-dev 
             libcairo2-dev 
             pkg-config 
             m4 
             cmake 
             cython 
             python3-dev 
             python3-yaml 
             curl 
             python3-setuptools && 
         rm -rf /var/lib/apt/lists/*
    
    RUN echo PYTHONPATH=$PYTHONPATH
    RUN pip3 install -U "pip>=20.2" pipdeptree setuptools wheel
    RUN pip3 install pycairo
    COPY ./libraries "${REPO_PATH}/libraries"
    RUN pip3 install "${REPO_PATH}/libraries/numpy-1.20.0-cp38-cp38-manylinux2014_aarch64.whl"
    RUN pip3 install "${REPO_PATH}/libraries/torch-2.1.0a0+41361538.nv23.06-cp38-cp38-linux_aarch64.whl"
    RUN pip3 install "${REPO_PATH}/libraries/torchvision-0.19.0-cp38-cp38-manylinux2014_aarch64.whl"
    
    RUN pipdeptree
    RUN pip list
    
    RUN echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" | sudo tee /etc/apt/sources.list.d/coral-edgetpu.list && 
        curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - && 
        sudo apt-get update && 
        sudo apt-get install libedgetpu1-std
    
    
    # install apt dependencies
    COPY ./dependencies-apt.txt "${REPO_PATH}/"
    RUN dt-apt-install ${REPO_PATH}/dependencies-apt.txt
    
    # install python3 dependencies
    COPY ./dependencies-py3.txt "${REPO_PATH}/"
    RUN pip3 install -r ${REPO_PATH}/dependencies-py3.txt
    
    # copy the source code
    COPY ./packages "${REPO_PATH}/packages"
    
    # build packages
    RUN . /opt/ros/${ROS_DISTRO}/setup.sh && 
      catkin build 
        --workspace ${CATKIN_WS_DIR}/
    
    # install launcher scripts
    COPY ./launchers/. "${LAUNCH_PATH}/"
    COPY ./launchers/default.sh "${LAUNCH_PATH}/"
    RUN dt-install-launchers "${LAUNCH_PATH}"
    
    # define default command
    CMD ["bash", "-c", "dt-launcher-${DT_LAUNCHER}"]
    
    # store module metadata
    LABEL org.duckietown.label.module.type="${REPO_NAME}" 
        org.duckietown.label.module.description="${DESCRIPTION}" 
        org.duckietown.label.module.icon="${ICON}" 
        org.duckietown.label.architecture="${ARCH}" 
        org.duckietown.label.code.location="${REPO_PATH}" 
        org.duckietown.label.code.version.distro="${DISTRO}" 
        org.duckietown.label.base.image="${BASE_IMAGE}" 
        org.duckietown.label.base.tag="${BASE_TAG}" 
        org.duckietown.label.maintainer="${MAINTAINER}"
    # <== Do not change the code above this line
    # <==================================================

here is the dockerfile as attached. please let me know if any other modification is needed. I am using nvidia jetson neno – 4GB with jetpack version 4.4

5

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật