RuntimeError: No such operator image::read_file on Docker
See original GitHub issueš Bug
In a Docker environment, torch.io.read_file
causes RuntimeError: No such operator image::read_file
.
To Reproduce
1. Setup a container
I used the following Docker file.
FROM nvidia/cuda:11.0-base-ubuntu20.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt update -qq \
&& apt install -y -qq \
apt-utils \
bzip2 \
build-essential \
cmake \
curl \
git \
libncurses5-dev \
libncursesw5-dev \
libboost-all-dev \
locales \
nasm \
ruby \
sudo \
swig \
unzip \
wget \
zsh \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
ENV CONDADIR ${HOME}/.miniconda
RUN cd ${HOME} \
&& wget -q https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh \
&& bash miniconda.sh -b -p ${CONDADIR} \
&& rm miniconda.sh
docker build -t test .
docker run --rm -it test
# in the launched container
export PATH=.miniconda/bin:$PATH
conda create -n test python=3.9 -y
source activate test
conda install -c pytorch -c nvidia -c conda-forge pytorch torchvision cudatoolkit=11.1 numpy -y # another issue, but numpy is not automatically installed as a dependency
Run the following
import torchvision
torchvision.io.read_file(".")
# RuntimeError: No such operator image::read_file
Expected behavior
Environment
collect_env.py
collects the following information (Docker v20.10.7).
Collecting environment information...
PyTorch version: 1.9.0
Is debug build: False
CUDA used to build PyTorch: 11.1
ROCM used to build PyTorch: N/A
OS: Ubuntu 20.04.1 LTS (x86_64)
GCC version: (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
Clang version: Could not collect
CMake version: version 3.16.3
Libc version: glibc-2.31
Python version: 3.9.5 (default, Jun 4 2021, 12:28:51) [GCC 7.5.0] (64-bit runtime)
Python platform: Linux-5.4.0-77-generic-x86_64-with-glibc2.31
Is CUDA available: False
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Versions of relevant libraries:
[pip3] numpy==1.21.0
[pip3] torch==1.9.0
[pip3] torchvision==0.10.0
[conda] blas 1.0 mkl
[conda] cudatoolkit 11.1.74 h6bb024c_0 nvidia
[conda] ffmpeg 4.3 hf484d3e_0 pytorch
[conda] libblas 3.9.0 9_mkl conda-forge
[conda] libcblas 3.9.0 9_mkl conda-forge
[conda] liblapack 3.9.0 9_mkl conda-forge
[conda] mkl 2021.2.0 h06a4308_296
[conda] numpy 1.21.0 py39hdbf815f_0 conda-forge
[conda] pytorch 1.9.0 py3.9_cuda11.1_cudnn8.0.5_0 pytorch
[conda] torchvision 0.10.0 py39_cu111 pytorch
Additional context
I could not reproduce this issue in a non-Docker environment. A nightly build resolved this issue.
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (9 by maintainers)
Top Results From Across the Web
No such operator image::read_file Ā· Issue #10 - GitHub
When i'm running camvid.py, This happened "No such operator image::read_file"ļ¼ Excuse me, why is this? Related error messagesļ¼
Read more >No such operator image::read_file - vision - PyTorch Forums
hello, When I ran main.py in PubMedCLIP with vision encoder ViT-B/32, something wrong: PubMedCLIP/PubMedCLIP at main Ā· sarahESL/PubMedCLIPĀ ...
Read more >RuntimeError: No such operator image::read_file on Docker
Bug ... In a Docker environment, torch.io.read_file causes RuntimeError: No such operator image::read_file . To Reproduce. 1. Setup a container.
Read more >č§£å³RuntimeError: No such operator image::read_file
ęę²ēē®ę ę£ęµåŗē°ēé®é¢.
Read more >PyTorch for Jetson - Jetson Nano - NVIDIA Developer Forums
RuntimeError : Unable to find a valid cuDNN algorithm to run convolution. in response to: ... RuntimeError: No such operator torchvision::nms.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi this error still persists in
pytorch 1.10.0.dev20210902
(cpu only version) andtorchvision 0.11.0a0+ad3c3f7
. The environment is WSL.I was trying to build the docs. Torchvision was installed using :
Exact Error :
EDIT
I tried to install conda install jpeg 9d and tried building the docs. The above error didnāt occur but a new one did :
This is the build log (only the initial part). It is saying that ffmpeg support is disabled because header files are not found.
EDIT 2 The issue is fixed now. I was building the entire docs even though torchvision wasnāt build with ffmpeg support. Setting the Environment variable EXAMPLES_PATTERN=āmodelsā did the job.
Hi @datumbox,
pytorch-nightly/linux-64::pytorch-1.10.0.dev20210822-py3.9_cuda11.1_cudnn8.0.5_0
, the latest nightliy build as of today, causes no problem. Thanks.