-
Notifications
You must be signed in to change notification settings - Fork 54
Can't install python packages with either pip or conda during Docker build #277
Comments
Here is my Dockerfile for pip installation of packages: `FROM ibmcom/powerai:1.6.0-all-ubuntu18.04-py3 ENV USER_NAME pwrai RUN ["/bin/bash", "-c", "cd /opt/anaconda3/bin && source activate base && IBM_POWERAI_LICENSE_ACCEPT=yes ./accept-powerai-license.sh" ] RUN sudo /bin/ln -sf /bin/bash /bin/sh RUN apt-get update && apt-get install -y RUN sudo apt-get clean && RUN echo $PATH python3.6 -m venv env && source ./env/bin/activate && python3.6 -m pip install --user --upgrade --no-cache-dir keras==2.1.6 && WORKDIR ${WORK_DIR} EXPOSE 8888 6006` |
And below is the error message I get trying to install packages with pip: `Collecting pip<22.0 error: invalid command 'bdist_wheel' Running setup.py clean for Cython During handling of the above exception, another exception occurred: Traceback (most recent call last): Running setup.py clean for numpy
Add Failed to build numpy
Command "/env/bin/python3.6 -u -c "import setuptools, tokenize;file='/tmp/pip-build-hgmtxb0b/numpy/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-wxeof2ob-record/install-record.txt --single-version-externally-managed --compile --install-headers /env/include/site/python3.6/numpy --user --prefix=" failed with error code 1 in /tmp/pip-build-hgmtxb0b/numpy/` |
Hi @jennyfolkesson , Our University Partners at Oregon State University provide conda channels with these packages. See https://osuosl.org/services/powerdev/opence/#current-release on a description how to install these packages |
Hi @jennyfolkesson , Alex is correct : you should use OpenCE recipes. If you need a pre built set, beside the OSU 'academic build', we have a reliable build for our client made by Rocket: see the RocketCE conda channel. |
Hi Eric, |
Hi,
I've been trying to build a Docker image on an IBM power9 server using ibmcom/powerai:1.6.0-all-ubuntu18.04-py3 as a base.
I've tried adding python packages using both pip and conda but neither one works, and I'm at a loss. It's hard to find answers by googling the errors since not many use the ppc64le architecture, so any help you can give me would be greatly appreciated.
Thank you.
Below is my Dockerfile for installing packages with conda, which during build hangs with the message:
"Solving environment: ...working... "
`FROM ibmcom/powerai:1.6.0-all-ubuntu18.04-py3
ENV USER_NAME pwrai
ENV WORK_DIR /home/${USER_NAME}/microDL
RUN ["/bin/bash", "-c", "cd /opt/anaconda3/bin && source activate base && IBM_POWERAI_LICENSE_ACCEPT=yes ./accept-powerai-license.sh" ]
RUN sudo /bin/ln -sf /bin/bash /bin/sh
RUN sudo apt-get update && sudo apt-get install -yq --no-install-recommends
software-properties-common &&
add-apt-repository universe
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
&& sudo apt-get update && sudo apt-get install -yq --no-install-recommends
build-essential
apt-utils
libcupti-dev
ca-certificates
cmake
libfreetype6-dev
wget
git
pkg-config
tmux
graphviz
vim
RUN sudo apt-get clean &&
sudo apt-get autoremove &&
sudo rm -rf /var/lib/apt/lists/*
ENV PATH /opt/anaconda3/bin:${PATH}
RUN sudo ln -s /opt/anaconda3/etc/profile.d/conda.sh /etc/profile.d/conda.sh
ADD conda_environment_docker.yml /tmp/conda.yml
RUN conda update -n base -c defaults --override-channels conda &&
conda env create --file=/tmp/conda.yml &&
conda install tensorflow-gpu==1.13.1 &&
conda activate micro_dl
WORKDIR ${WORK_DIR}
ENV PYTHONPATH ${WORK_DIR}
RUN sudo chown ${USER_NAME} ${WORK_DIR}
RUN sudo chgrp ${USER_NAME} ${WORK_DIR}
EXPOSE 8888 6006`
The text was updated successfully, but these errors were encountered: