Skip to content

Docker image doesn't build #124

@replomancer

Description

@replomancer

Expected Behavior

docker build -t pydp:test .

should build the image from Dockerfile.

Current Behavior

Due to package name change the building process ends with:

adding 'python_dp-0.1.0.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel
WARNING: Requirement 'dist/pydp-0.1.0-py2.py3-none-any.whl' looks like a filename, but the file does not exist
Processing ./dist/pydp-0.1.0-py2.py3-none-any.whl
ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '/root/PyDP/dist/pydp-0.1.0-py2.py3-none-any.whl'
The command '/bin/sh -c bash build_PyDP.sh &&     python3 setup.py sdist bdist_wheel &&     pip install dist/pydp-0.1.0-py2.py3-none-any.whl &&     pip install -r requirements_dev.txt' returned a non-zero code: 1

After changing the package path to dist/python_dp-0.1.0-py2.py3-none-any.whl in Dockerfile I get another error:

Sending build context to Docker daemon  2.168MB
Step 1/12 : FROM python:3.6-slim-buster
 ---> 8bf54e6af8e1
Step 2/12 : ENV HOME /root
 ---> Using cache
 ---> 5d67399a725e
Step 3/12 : ENV PATH "/root/bin:${PATH}"
 ---> Using cache
 ---> a0ec8b25b647
Step 4/12 : WORKDIR /root
 ---> Using cache
 ---> daa89cb03d18
Step 5/12 : RUN     apt-get update &&     apt-get -y install software-properties-common     sudo     wget     unzip     gcc     g++     build-essential     python3-distutils     pkg-config     zip     zlib1g-dev     git &&     wget https://github.com/bazelbuild/bazel/releases/download/2.1.0/bazel-2.1.0-installer-linux-x86_64.sh &&     chmod +x bazel-2.1.0-installer-linux-x86_64.sh &&     ./bazel-2.1.0-installer-linux-x86_64.sh --user &&     export PATH="$PATH:$HOME/bin" &&     rm bazel-2.1.0-installer-linux-x86_64.sh
 ---> Using cache
 ---> 8b0d41e5433a
Step 6/12 : WORKDIR /tmp/third_party
 ---> Using cache
 ---> e1f2ccd7e9e9
Step 7/12 : RUN git clone https://github.com/google/differential-privacy.git &&     git clone https://github.com/pybind/pybind11_bazel.git
 ---> Using cache
 ---> dccd66076d9c
Step 8/12 : WORKDIR /root/PyDP
 ---> Using cache
 ---> 479c29e85c61
Step 9/12 : COPY . /root/PyDP
 ---> Using cache
 ---> a9dd0ef391a7
Step 10/12 : RUN cp -r /tmp/third_party/* /root/PyDP/third_party
 ---> Running in f42db9ebf3a1
cp: cannot overwrite non-directory '/root/PyDP/third_party/differential-privacy/.git' with directory '/tmp/third_party/differential-privacy/.git'
cp: cannot overwrite non-directory '/root/PyDP/third_party/pybind11_bazel/.git' with directory '/tmp/third_party/pybind11_bazel/.git'
The command '/bin/sh -c cp -r /tmp/third_party/* /root/PyDP/third_party' returned a non-zero code: 1

Workaround:

docker build --no-cache -t pydp:test .

Steps to Reproduce Behavior

How can we reproduce this?

docker build -t pydp:test .

System information

  • PyDP version: commit 2c1d36b
  • Python version: (Docker base image is python:3.6-slim-buster)
  • Bazel version: (Bazel 2.1.0 is installed during image building)
  • Operating System: (Docker base image is python:3.6-slim-buster)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Good first issue 🎓Perfect for beginners, welcome to OpenMined!Type: Bug 🐛Some functionality not working in the codebase as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions