<h2 dir="auto"><g-emoji class="g-emoji" alias="question" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2753.png">❓</g-emoji> Questions and Help</h2>
<p dir="auto">Hello,</p>
<p dir="auto">I'm trying to run pytorch v1.0.0 on aws lambda for object detection inference, and i'm building the package on <code class="notranslate">lambci/lambda:build-python3.6</code> docker image using the following command lines :</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="RUN git clone --recursive https://github.com/pytorch/pytorch.git --branch=v1.0.0

ENV NO_CUDA=1
ENV NO_TEST=1
ENV NO_NNPACK=1
ENV NO_QNNPACK=1
ENV NO_MKLDNN=1
ENV NO_DISTRIBUTED=1
ENV NO_CUDNN=1
ENV NO_FBGEMM=1
ENV NO_MIOPEN=1
ENV NO_CAFFE2_OPS=1
ENV BUILD_BINARY=0

RUN cd pytorch &amp;&amp; python setup.py install"><pre lang="Docker" class="notranslate"><code class="notranslate">RUN git clone --recursive https://github.com/pytorch/pytorch.git --branch=v1.0.0

ENV NO_CUDA=1
ENV NO_TEST=1
ENV NO_NNPACK=1
ENV NO_QNNPACK=1
ENV NO_MKLDNN=1
ENV NO_DISTRIBUTED=1
ENV NO_CUDNN=1
ENV NO_FBGEMM=1
ENV NO_MIOPEN=1
ENV NO_CAFFE2_OPS=1
ENV BUILD_BINARY=0

RUN cd pytorch &amp;&amp; python setup.py install
</code></pre></div>
<p dir="auto">the torch package is build successfully and I'm able to upload it on aws lambda, but I get the following errors when I try to run inference :<br>
<code class="notranslate">Error in cpuinfo: failed to parse the list of possible procesors in /sys/devices/system/cpu/possible</code><br>
<code class="notranslate">Error in cpuinfo: failed to parse the list of present procesors in /sys/devices/system/cpu/present</code></p>
<p dir="auto">knowing that I disabled NNPACK, QNNPACK and  MKLDNN in the build above (I'm not sure if it's related or not)</p>
<p dir="auto">I was able to do the same a couple months back using just caffe2, here is the snippet of code and the commit I was using:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="RUN git clone --recursive https://github.com/pytorch/pytorch.git /caffe2
WORKDIR /caffe2
RUN git checkout 8601b33c079545bcd45b37983d2ec355b2215960
RUN git submodule update --init --recursive
RUN cp -a -r /caffe2/modules/detectron/*.cu /caffe2/caffe2/operators/
RUN cp -a -r /caffe2/modules/detectron/*.cc /caffe2/caffe2/operators/
RUN cp -a -r /caffe2/modules/detectron/*.h /caffe2/caffe2/operators/

RUN mkdir build &amp;&amp; cd build &amp;&amp; \
    cmake -DUSE_GFLAGS=OFF \
          -DUSE_GLOG=OFF \
          -DBUILD_SHARED_LIBS=OFF \
          -DCMAKE_INSTALL_PREFIX=&quot;/cf2/&quot; \
          -DCMAKE_PREFIX_PATH=&quot;/cf2/&quot; \
          -DUSE_GLOO=OFF \
          -DUSE_CUDA=OFF \
          -DUSE_MPI=OFF \
          -DUSE_METAL=OFF \
          -DUSE_NCCL=OFF \
          -DUSE_NNPACK=OFF \
          -DUSE_MOBILE_OPENGL=OFF \
          -DBUILD_CUSTOM_PROTOBUF=OFF \
          -DUSE_LEVELDB=OFF \
          -DUSE_LMDB=OFF \
          -DUSE_NUMA=OFF \
          -DUSE_OPENCV=OFF \
          -DUSE_NCCL=OFF \
          .. \
          &amp;&amp;  make -j$(nproc) \
          &amp;&amp; make install/fast \
          &amp;&amp; ldconfig"><pre class="notranslate"><code class="notranslate">RUN git clone --recursive https://github.com/pytorch/pytorch.git /caffe2
WORKDIR /caffe2
RUN git checkout 8601b33c079545bcd45b37983d2ec355b2215960
RUN git submodule update --init --recursive
RUN cp -a -r /caffe2/modules/detectron/*.cu /caffe2/caffe2/operators/
RUN cp -a -r /caffe2/modules/detectron/*.cc /caffe2/caffe2/operators/
RUN cp -a -r /caffe2/modules/detectron/*.h /caffe2/caffe2/operators/

RUN mkdir build &amp;&amp; cd build &amp;&amp; \
    cmake -DUSE_GFLAGS=OFF \
          -DUSE_GLOG=OFF \
          -DBUILD_SHARED_LIBS=OFF \
          -DCMAKE_INSTALL_PREFIX="/cf2/" \
          -DCMAKE_PREFIX_PATH="/cf2/" \
          -DUSE_GLOO=OFF \
          -DUSE_CUDA=OFF \
          -DUSE_MPI=OFF \
          -DUSE_METAL=OFF \
          -DUSE_NCCL=OFF \
          -DUSE_NNPACK=OFF \
          -DUSE_MOBILE_OPENGL=OFF \
          -DBUILD_CUSTOM_PROTOBUF=OFF \
          -DUSE_LEVELDB=OFF \
          -DUSE_LMDB=OFF \
          -DUSE_NUMA=OFF \
          -DUSE_OPENCV=OFF \
          -DUSE_NCCL=OFF \
          .. \
          &amp;&amp;  make -j$(nproc) \
          &amp;&amp; make install/fast \
          &amp;&amp; ldconfig
</code></pre></div>
<p dir="auto">at that time I was getting the same cpuinfo error when i was building with NNPACK, but no problem once I disabled NNPACK</p>
<p dir="auto">Thanks,<br>
Bendidi</p>
<h2 dir="auto"><g-emoji class="g-emoji" alias="bug" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f41b.png">🐛</g-emoji> Bug</h2>
<p dir="auto">I am running an image classification model with Serverless and AWS Lambda. Receiving following error upon calling the Serverless function; <strong>"Error in cpuinfo: failed to parse the list of present procesors in /sys/devices/system/cpu/present"</strong> - I did not misspell this, the spelling is copied from the error message I received and appear with the same spelling here;<br>
<a href="https://github.com/pytorch/cpuinfo/blob/master/src/linux/processors.c">https://github.com/pytorch/cpuinfo/blob/master/src/linux/processors.c</a></p>
<p dir="auto">Suspected it might be something with Pytorch 1.0.0 so I switched back to Pytorch 0.4.1 which made it work.</p>
<h2 dir="auto">To Reproduce</h2>
<p dir="auto">Steps to reproduce the behavior:</p>
<ol dir="auto">
<li>
<p dir="auto">Run Pytorch in a Lambda with following whl in the requirements.txt;<br>
Pillow==5.3.0<br>
PyYAML==3.13<br>
<strong><a href="https://download.pytorch.org/whl/cpu/torch-1.0.0-cp36-cp36m-linux_x86_64.whl" rel="nofollow">https://download.pytorch.org/whl/cpu/torch-1.0.0-cp36-cp36m-linux_x86_64.whl</a></strong><br>
torchvision==0.2.1</p>
</li>
<li>
<p dir="auto">Load optional model and predict an image, this error should arise; <strong>"Error in cpuinfo: failed to parse the list of present procesors in /sys/devices/system/cpu/present"</strong><br>
and you will also get a timeout from the Lambda, regardless of how long timeout that is chosen; <strong>"Process exited before completing request"</strong></p>
</li>
</ol>
<p dir="auto">No stack trace available, I only receive <strong>"Error in cpuinfo: failed to parse the list of present procesors in /sys/devices/system/cpu/present"</strong><br>
and a timeout error; <strong>"Process exited before completing request"</strong></p>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">Expected image prediction from the model every time a new image is uploaded.</p>
<h2 dir="auto">Environment</h2>
<ul dir="auto">
<li>PyTorch Version (e.g., 1.0): <strong>1.0.0</strong></li>
<li>OS (e.g., Linux): <strong>Linux</strong></li>
<li>How you installed PyTorch (<code class="notranslate">conda</code>, <code class="notranslate">pip</code>, source): <strong>pip3</strong></li>
<li>Build command you used (if compiling from source):</li>
<li>Python version: <strong>3.6</strong></li>
<li>CUDA/cuDNN version: <strong>No CUDA</strong></li>
<li>GPU models and configuration: <strong>No GPU</strong></li>
<li>Any other relevant information: <strong>Deployed with Serverless and AWS Lambda, 3008 GB memory and 30 second timeout, works with Pytorch 0.4.1</strong></li>
</ul>
<h2 dir="auto">Additional context</h2>
<p dir="auto">Suspected it might be something with Pytorch 1.0.0 so I switched back to Pytorch 0.4.1 which made the image prediction work.</p>
<p dir="auto">Let me know if I can provide any additional information.</p>