print(dir(trt)) returns
on CLI:
['ActivationType', 'AllocatorFlag', 'Builder', 'BuilderFlag', 'CURDIR', 'CaffeParser', 'CalibrationAlgoType', 'DataType', 'DeviceType', 'Dims', 'Dims2', 'Dims3', 'Dims4', 'DimsHW', 'ElementWiseOperation', 'EngineCapability', 'EngineInspector', 'ErrorCode', 'ErrorCodeTRT', 'FallbackString', 'FieldCollection', 'FieldMap', 'FieldType', 'FillOperation', 'GatherMode', 'IActivationLayer', 'IAlgorithm', 'IAlgorithmContext', 'IAlgorithmIOInfo', 'IAlgorithmSelector', 'IAlgorithmVariant', 'IAssertionLayer', 'IBlobNameToTensor', 'IBuilderConfig', 'ICaffePluginFactoryV2', 'IConcatenationLayer', 'IConditionLayer', 'IConstantLayer', 'IConvolutionLayer', 'ICudaEngine', 'IDeconvolutionLayer', 'IDequantizeLayer', 'IEinsumLayer', 'IElementWiseLayer', 'IErrorRecorder', 'IExecutionContext', 'IFillLayer', 'IFullyConnectedLayer', 'IGatherLayer', 'IGpuAllocator', 'IHostMemory', 'IIdentityLayer', 'IIfConditional', 'IIfConditionalBoundaryLayer', 'IIfConditionalInputLayer', 'IIfConditionalOutputLayer', 'IInt8Calibrator', 'IInt8EntropyCalibrator', 'IInt8EntropyCalibrator2', 'IInt8LegacyCalibrator', 'IInt8MinMaxCalibrator', 'IIteratorLayer', 'ILRNLayer', 'ILayer', 'ILogger', 'ILoop', 'ILoopBoundaryLayer', 'ILoopOutputLayer', 'IMatrixMultiplyLayer', 'INetworkDefinition', 'IOptimizationProfile', 'IPaddingLayer', 'IParametricReLULayer', 'IPluginCreator', 'IPluginRegistry', 'IPluginV2', 'IPluginV2Ext', 'IPluginV2Layer', 'IPoolingLayer', 'IProfiler', 'IQuantizeLayer', 'IRNNv2Layer', 'IRaggedSoftMaxLayer', 'IRecurrenceLayer', 'IReduceLayer', 'IResizeLayer', 'IScaleLayer', 'IScatterLayer', 'ISelectLayer', 'IShapeLayer', 'IShuffleLayer', 'ISliceLayer', 'ISoftMaxLayer', 'ITensor', 'ITimingCache', 'ITopKLayer', 'ITripLimitLayer', 'IUnaryLayer', 'LayerInformationFormat', 'LayerType', 'Logger', 'LoopOutput', 'MatrixOperation', 'MemoryPoolType', 'NetworkDefinitionCreationFlag', 'NodeIndices', 'OnnxParser', 'PaddingMode', 'ParserError', 'Permutation', 'PluginField', 'PluginFieldCollection', 'PluginFieldCollection_', 'PluginFieldType', 'PoolingType', 'Profiler', 'ProfilingVerbosity', 'QuantizationFlag', 'RNNDirection', 'RNNGateType', 'RNNInputMode', 'RNNOperation', 'ReduceOperation', 'Refitter', 'ResizeCoordinateTransformation', 'ResizeMode', 'ResizeRoundMode', 'ResizeSelector', 'Runtime', 'ScaleMode', 'ScatterMode', 'SliceMode', 'SubGraphCollection', 'TacticSource', 'TensorFormat', 'TensorLocation', 'TopKOperation', 'TripLimit', 'UffInputOrder', 'UffParser', 'UnaryOperation', 'Weights', 'WeightsRole', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', '__version__', '_itemsize', 'attr', 'bool', 'common_enter', 'common_exit', 'ctypes', 'find_lib', 'float16', 'float32', 'get_builder_plugin_registry', 'get_nv_onnx_parser_version', 'get_plugin_registry', 'glob', 'init_libnvinfer_plugins', 'int32', 'int8', 'lib', 'nptype', 'os', 'shutdown_protobuf_library', 'sys', 'tensorrt', 'try_load', 'value', 'volume', 'warnings']
in python script:
['__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__']
It seems that if I create a python script in /
it works as intended but when i create it in my host directory that i mounted, it does not import correctly…