isayevlab / AIMNet2

75 stars 22 forks source link

Docker build error #7

Closed izxle closed 2 weeks ago

izxle commented 10 months ago

I cloned the repo, tried to build the docker, and got this error.

% docker build --pull --rm -f "Dockerfile_cpu" -t aimnet-box "."
[+] Building 2.7s (11/11) FINISHED                                                                                                         docker:desktop-linux
 => [internal] load .dockerignore                                                                                                                          0.0s
 => => transferring context: 2B                                                                                                                            0.0s
 => [internal] load build definition from Dockerfile_cpu                                                                                                   0.0s
 => => transferring dockerfile: 317B                                                                                                                       0.0s
 => [internal] load metadata for docker.io/condaforge/mambaforge:latest                                                                                    2.5s
 => CANCELED [1/7] FROM docker.io/condaforge/mambaforge:latest@sha256:615e43f72b49a6d46d3f93f7fadf7b7e22f6de934b8e1c46b01becb2816e8fc7                     0.0s
 => => resolve docker.io/condaforge/mambaforge:latest@sha256:615e43f72b49a6d46d3f93f7fadf7b7e22f6de934b8e1c46b01becb2816e8fc7                              0.0s
 => => sha256:615e43f72b49a6d46d3f93f7fadf7b7e22f6de934b8e1c46b01becb2816e8fc7 2.36kB / 2.36kB                                                             0.0s
 => => sha256:1461e0a1fa14431128dc95d921655fd6cd0b9147b4ec757c6d99e02776e82b47 676B / 676B                                                                 0.0s
 => [internal] load build context                                                                                                                          0.0s
 => => transferring context: 2B                                                                                                                            0.0s
 => CACHED [2/7] RUN mamba install -q -y -c conda-forge openbabel                                                                                          0.0s
 => ERROR [3/7] COPY requirements.txt .                                                                                                                    0.0s
 => CACHED [4/7] RUN pip install requirements.txt                                                                                                          0.0s
 => CACHED [5/7] WORKDIR /app                                                                                                                              0.0s
 => ERROR [6/7] COPY ../calculators/ calculators/                                                                                                          0.0s
 => ERROR [7/7] COPY ../models/ models/                                                                                                                    0.0s
------
 > [3/7] COPY requirements.txt .:
------
------
 > [6/7] COPY ../calculators/ calculators/:
------
------
 > [7/7] COPY ../models/ models/:
------
Dockerfile_cpu:7
--------------------
   5 |     WORKDIR /app
   6 |     COPY ../calculators/ calculators/
   7 | >>> COPY ../models/ models/
   8 |     ENTRYPOINT [ "python3" ,"/app/calculators/aimnet2_ase_opt.py"]
   9 |     
--------------------
ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref bf78f52f-4126-42f4-a771-f8eba05fa16e::x0f2um24r0hbeap1ulgdu9sq0: "/models": not found

Running on MacOS Ventura 13.6 (22G120) with Docker 4.23.0 (120376)

Mirual commented 9 months ago

I have encountered a similar problem. You can solve this problem without going to the docker folder. Just run the following command from the root of the /AIMNet2 directory ' docker build --platform linux/amd64 --pull --rm -f "docker/Dockerfile_cpu" -t aimnet-box "." '