Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arm build error (Pi4, aarch64) #61

Closed
arminus opened this issue Mar 19, 2022 · 18 comments · Fixed by #62
Closed

arm build error (Pi4, aarch64) #61

arminus opened this issue Mar 19, 2022 · 18 comments · Fixed by #62

Comments

@arminus
Copy link

arminus commented Mar 19, 2022

Trying to build the docker-compose.yml, I get this:

            Copying numpy.egg-info to build/bdist.linux-aarch64/wheel/numpy-1.19.3-py3.8.egg-info
            running install_scripts
            Running from numpy source directory.
...
              File "/tmp/pip-build-env-uxfs2b_0/overlay/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 278, in get_tag
                assert tag in supported_tags, "would build wheel with unsupported tag {}".format(tag)
            AssertionError: would build wheel with unsupported tag ('cp38', 'cp38', 'linux_aarch64')
            [end of output]
      
        note: This error originates from a subprocess, and is likely not a problem with pip.
        ERROR: Failed building wheel for numpy
        Building wheel for cmake (pyproject.toml): started
        Building wheel for cmake (pyproject.toml): finished with status 'error'
        error: subprocess-exited-with-error
      
        × Building wheel for cmake (pyproject.toml) did not run successfully.
        │ exit code: 1
        ╰─> [9 lines of output]
              File "/tmp/pip-build-env-0shkflic/overlay/lib/python3.8/site-packages/skbuild/setuptools_wrap.py", line 566, in setup
                cmkr = cmaker.CMaker(cmake_executable)
              File "/tmp/pip-build-env-0shkflic/overlay/lib/python3.8/site-packages/skbuild/cmaker.py", line 133, in __init__
                self.cmake_version = get_cmake_version(self.cmake_executable)
              File "/tmp/pip-build-env-0shkflic/overlay/lib/python3.8/site-packages/skbuild/cmaker.py", line 88, in get_cmake_version
                raise SKBuildError(
            Traceback (most recent call last):
      
            Problem with the CMake installation, aborting build. CMake executable is cmake
            [end of output]
      
        note: This error originates from a subprocess, and is likely not a problem with pip.
        ERROR: Failed building wheel for cmake
      Failed to build numpy cmake
      ERROR: Could not build wheels for numpy, cmake, which is required to install pyproject.toml-based projects
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
The command '/bin/sh -c pip install --no-cache-dir --upgrade -r /code/requirements.txt' returned a non-zero code: 1
ERROR: Service 'immich_tf_fastapi' failed to build : Build failed
@alextran1502
Copy link
Contributor

alextran1502 commented Mar 19, 2022

You will have to comment out the immich_tf_fastapi in docker-compose file if you build on Rapsberry Pi. That container uses TensorFlow 2 and currently not supported on Rpi

@arminus
Copy link
Author

arminus commented Mar 19, 2022

Ok, I missed that. So that get's me one step further:

Starting compilation in watch mode...
immich_server_1  | 
immich_server_1  | [2:35:01 PM] Found 0 errors. Watching for file changes.
immich_server_1  | 
immich_server_1  | 
immich_server_1  | /usr/src/app/node_modules/@nestjs/config/dist/config.module.js:66
immich_server_1  |                 throw new Error(`Config validation error: ${error.message}`);
immich_server_1  |                       ^
immich_server_1  | Error: Config validation error: "MAPBOX_KEY" failed custom validation because Cannot read properties of undefined (reading 'presence')

my .env file is set like this

# STAGE
NODE_ENV=development

# Database
DB_USERNAME=postgres
DB_PASSWORD=postgres
DB_DATABASE_NAME=immich

# Upload File Config
UPLOAD_LOCATION=/mnt/2TB/Media/Immich

# JWT SECRET
JWT_SECRET=klashdkj786556q23e91

# MAPBOX
## ENABLE_MAPBOX is either true of false -> if true, you have to provide MAPBOX_KEY
ENABLE_MAPBOX=false
MAPBOX_KEY=

setting MAPBOX_KEY to some arbitrary value doesn't change anything.

@alextran1502
Copy link
Contributor

When you change your .env file, did you re-run the docker-compose command again? I haven't seen this behavior on my system

@arminus
Copy link
Author

arminus commented Mar 19, 2022

Yes, this happens when I run docker-compose -f ./docker/docker-compose.yml up --build -V

@alextran1502
Copy link
Contributor

Ah, I think I found the reason. Fixed in #62. Can you please pull the main branch and try again?

@alextran1502 alextran1502 linked a pull request Mar 19, 2022 that will close this issue
@alextran1502
Copy link
Contributor

Actually, there is still a problem, I am working on this one

@alextran1502
Copy link
Contributor

Ok, it is good now. Fixed in commit dbd79f47975f2105ca4f9687b8fcdbd6bd2ee3ab

@arminus
Copy link
Author

arminus commented Mar 19, 2022

Confirmed, thanks for the quick fix.

Next problem:

immich_postgres  | 2022-03-19 16:10:53.763 UTC [34] FATAL:  database "immich" does not exist

How do I create/seed the database?

@alextran1502
Copy link
Contributor

Can I see your docker-compose file? The database should be created at startup.

@arminus
Copy link
Author

arminus commented Mar 19, 2022

Here you go. No real change to your version in git:

diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml
index 8298eac..4a3eb36 100644
--- a/docker/docker-compose.yml
+++ b/docker/docker-compose.yml
@@ -61,26 +61,26 @@ services:
     depends_on:
       - immich_server
 
-  immich_tf_fastapi:
-    container_name: immich_tf_fastapi
-    image: tensor_flow_fastapi:1.0.0
-    restart: always
-    command: uvicorn app.main:app --proxy-headers --host 0.0.0.0 --port 8000 --reload
-    build:
-      context: ../machine_learning
-      target: cpu
-      dockerfile: ../machine_learning/Dockerfile
-    volumes:
-      - ../machine_learning/app:/code/app
-      - ${UPLOAD_LOCATION}:/code/app/upload
-    ports:
-      - 2285:8000
-    expose:
-      - "8000"
-    depends_on:
-      - database
-    networks:
-      - immich_network
+#  immich_tf_fastapi:
+#    container_name: immich_tf_fastapi
+#    image: tensor_flow_fastapi:1.0.0
+#    restart: always
+#    command: uvicorn app.main:app --proxy-headers --host 0.0.0.0 --port 8000 --reload
+#    build:
+#      context: ../machine_learning
+#      target: cpu
+#      dockerfile: ../machine_learning/Dockerfile
+#    volumes:
+#      - ../machine_learning/app:/code/app
+#      - ${UPLOAD_LOCATION}:/code/app/upload
+#    ports:
+#      - 2285:8000
+#    expose:
+#      - "8000"
+#    depends_on:
+#      - database
+#    networks:
+#      - immich_network
 
 networks:
   immich_network:

@arminus
Copy link
Author

arminus commented Mar 19, 2022

And here's my .env file:

# STAGE
NODE_ENV=development

# Database
DB_USERNAME=postgres
DB_PASSWORD=postgres
DB_DATABASE_NAME=immich

# Upload File Config
UPLOAD_LOCATION=/mnt/2TB/Media/Immich

# JWT SECRET
JWT_SECRET=klashdkj786556q23e91

# MAPBOX
## ENABLE_MAPBOX is either true of false -> if true, you have to provide MAPBOX_KEY
ENABLE_MAPBOX=false
MAPBOX_KEY=

@ippocratis
Copy link

Confirmed, thanks for the quick fix.

Next problem:

immich_postgres  | 2022-03-19 16:10:53.763 UTC [34] FATAL:  database "immich" does not exist

How do I create/seed the database?

maybe similar to this
#17 (comment)

@alextran1502
Copy link
Contributor

@ippocratis Thank you for the suggestion. Another relevant source I just found; Postgres image is not creating database

@arminus Can you try what @ippocratis suggested?

I haven't been able to acquire an RPi4 to test.

@arminus
Copy link
Author

arminus commented Mar 19, 2022

yep, I had the same thought after a while and that did solve that problem.

Now all containers appear to be up and running, no error messages as far as I can tell, I managed to create a user, but when I try to load http://pi4:283 I get a 404, "Cannot GET /"

nginx is running on

cec0a1061b38   nginx:latest                                        "/docker-entrypoint.…"   2 minutes ago   Up 2 minutes   0.0.0.0:2283->80/tcp, :::2283->80/tcp, 0.0.0.0:2284->443/tcp, :::2284->443/tcp       proxy_nginx

and there's no port conflict on 2283 orr 2284

Can't get any logs form nginx:

docker logs proxy_nginx
Error response from daemon: configured logging driver does not support reading

@arminus
Copy link
Author

arminus commented Mar 19, 2022

Here's the immich_server log:

immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:53 PM     LOG [NestFactory] Starting Nest application...
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:54 PM     LOG [InstanceLoader] AppModule dependencies initialized +357ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:54 PM     LOG [InstanceLoader] TypeOrmModule dependencies initialized +2ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:54 PM     LOG [InstanceLoader] JwtModule dependencies initialized +4ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:54 PM     LOG [InstanceLoader] ConfigHostModule dependencies initialized +4ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:54 PM     LOG [InstanceLoader] DiscoveryModule dependencies initialized +1ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:54 PM     LOG [InstanceLoader] ConfigModule dependencies initialized +4ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:54 PM     LOG [InstanceLoader] ConfigModule dependencies initialized +2ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:54 PM     LOG [InstanceLoader] BullModule dependencies initialized +2ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:54 PM     LOG [InstanceLoader] ServerInfoModule dependencies initialized +3ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:54 PM     LOG [InstanceLoader] BullModule dependencies initialized +2ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:54 PM     LOG [InstanceLoader] BullModule dependencies initialized +33ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:54 PM     LOG [InstanceLoader] BullModule dependencies initialized +2ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:54 PM     LOG [InstanceLoader] BullModule dependencies initialized +2ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:54 PM     LOG [InstanceLoader] BullModule dependencies initialized +2ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:54 PM     LOG [InstanceLoader] BullModule dependencies initialized +1ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:55 PM     LOG [InstanceLoader] TypeOrmCoreModule dependencies initialized +951ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:55 PM     LOG [InstanceLoader] TypeOrmModule dependencies initialized +2ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:55 PM     LOG [InstanceLoader] TypeOrmModule dependencies initialized +2ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:55 PM     LOG [InstanceLoader] TypeOrmModule dependencies initialized +3ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:55 PM     LOG [InstanceLoader] TypeOrmModule dependencies initialized +2ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:55 PM     LOG [InstanceLoader] CommunicationModule dependencies initialized +6ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:55 PM     LOG [InstanceLoader] ImmichJwtModule dependencies initialized +3ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:55 PM     LOG [InstanceLoader] BackgroundTaskModule dependencies initialized +2ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:55 PM     LOG [InstanceLoader] UserModule dependencies initialized +7ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:55 PM     LOG [InstanceLoader] ImageOptimizeModule dependencies initialized +2ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:55 PM     LOG [InstanceLoader] DeviceInfoModule dependencies initialized +3ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:55 PM     LOG [InstanceLoader] AuthModule dependencies initialized +2ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:55 PM     LOG [InstanceLoader] AssetModule dependencies initialized +2ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:55 PM     LOG [RoutesResolver] UserController {/user}: +51ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:55 PM     LOG [RoutesResolver] AssetController {/asset}: +3ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:55 PM     LOG [RouterExplorer] Mapped {/asset/upload, POST} route +16ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:55 PM     LOG [RouterExplorer] Mapped {/asset/file, GET} route +4ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:55 PM     LOG [RouterExplorer] Mapped {/asset/allLocation, GET} route +3ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:55 PM     LOG [RouterExplorer] Mapped {/asset/searchTerm, GET} route +3ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:55 PM     LOG [RouterExplorer] Mapped {/asset/search, POST} route +4ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:55 PM     LOG [RouterExplorer] Mapped {/asset/new, GET} route +2ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:55 PM     LOG [RouterExplorer] Mapped {/asset/all, GET} route +4ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:55 PM     LOG [RouterExplorer] Mapped {/asset, GET} route +3ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:55 PM     LOG [RouterExplorer] Mapped {/asset/:deviceId, GET} route +5ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:55 PM     LOG [RouterExplorer] Mapped {/asset/assetById/:assetId, GET} route +3ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:55 PM     LOG [RouterExplorer] Mapped {/asset, DELETE} route +4ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:55 PM     LOG [RoutesResolver] AuthController {/auth}: +2ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:55 PM     LOG [RouterExplorer] Mapped {/auth/login, POST} route +4ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:55 PM     LOG [RouterExplorer] Mapped {/auth/signUp, POST} route +3ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:55 PM     LOG [RouterExplorer] Mapped {/auth/validateToken, POST} route +2ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:55 PM     LOG [RoutesResolver] DeviceInfoController {/device-info}: +1ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:55 PM     LOG [RouterExplorer] Mapped {/device-info, POST} route +2ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:55 PM     LOG [RouterExplorer] Mapped {/device-info, PATCH} route +3ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:55 PM     LOG [RoutesResolver] ServerInfoController {/server-info}: +1ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:55 PM     LOG [RouterExplorer] Mapped {/server-info, GET} route +3ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:55 PM     LOG [RouterExplorer] Mapped {/server-info/ping, GET} route +2ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:55 PM     LOG [RouterExplorer] Mapped {/server-info/mapbox, GET} route +2ms
immich_server_1  | [Nest] 30  - 03/19/2022, 5:23:55 PM     LOG [NestApplication] Nest application successfully started +40ms

@alextran1502
Copy link
Contributor

There is no web interface. If you have an iPhone, you can download the app from the app store to use it. If you have an Android, you can download the latest APK in the release tab to use it. I'm in the process of getting the app onto Google Playstore

@ippocratis
Copy link

There is no web interface. If you have an iPhone, you can download the app from the app store to use it. If you have an Android, you can download the latest APK in the release tab to use it. I'm in the process of getting the app onto Google Playstore

A non google services depended version of the app released here or on fdroid will be more than welcone

@arminus
Copy link
Author

arminus commented Mar 20, 2022

There is no web interface.

right. missed that, too. Working now.

If you have an iPhone, you can download the app from the app store to use it. If you have an Android, you can download the latest APK in the release tab to use it. I'm in the process of getting the app onto Google Playstore

your dev version works. I have some other observations, but that has nothing to do with this ticket.

Thanks again for the quick help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants