Issue with deploying my app , it has face_Recoginition library
swastikkaushal1
FREEOP

10 months ago

Cmake is not installed on your pc
i have tried a packages.txt file also still no progress please help

Solved

6 Replies

echohack
EMPLOYEE

10 months ago

Heya,

Looks like you're not declaring your dependencies correctly. Try this instead?

nixpacks.toml:

```
nixPkgs = ["cmake", "g++", "gcc", "make", "python3", "pip", "pkgconfig"]

cmds = ["ln -sf $(which cmake) /usr/local/bin/cmake"]

[phases.install]

cmds = ["pip install -r requirements.txt"]
```


Status changed to Awaiting User Response Railway 11 months ago


echohack

Heya,Looks like you're not declaring your dependencies correctly. Try this instead?nixpacks.toml:```nixPkgs = ["cmake", "g++", "gcc", "make", "python3", "pip", "pkgconfig"]cmds = ["ln -sf $(which cmake) /usr/local/bin/cmake"][phases.install]cmds = ["pip install -r requirements.txt"]```

swastikkaushal1
FREEOP

10 months ago

Tried with your code it failed this is the logs
|
```
==============

Apr 28 17:58:19

╔══════════════ Nixpacks v1.34.1 ══════════════╗

Apr 28 17:58:19

║──────────────────────────────────────────────║

Apr 28 17:58:19

║──────────────────────────────────────────────║

Apr 28 17:58:19

║ start │ python app.py

Apr 28 17:58:20

[internal] load build definition from Dockerfile heavy_check_mark emoji 0ms

Apr 28 17:58:20

[internal] load build definition from Dockerfile heavy_check_mark emoji 7ms

Apr 28 17:58:20

[internal] load .dockerignore heavy_check_mark emoji 0ms

Apr 28 17:58:20

[internal] load .dockerignore

Apr 28 17:58:20

[stage-0 7/10] COPY . /app/.

Apr 28 17:58:20

[stage-0 4/10] RUN nix-env -if .nixpacks/nixpkgs-bc8f8d1be58e8c8383e683a06e1e1e57893fff87.nix && nix-collect-garbage -d

Apr 28 17:58:20

[internal] load build context heavy_check_mark emoji 1ms

Apr 28 17:58:20

[internal] load build context

Apr 28 17:58:20

[internal] load build context heavy_check_mark emoji 19ms

Apr 28 17:58:20

[stage-0 3/10] COPY .nixpacks/nixpkgs-bc8f8d1be58e8c8383e683a06e1e1e57893fff87.nix .nixpacks/nixpkgs-bc8f8d1be58e8c8383e683a06e1e1e57893fff87.nix

Apr 28 17:58:20

[stage-0 3/10] COPY .nixpacks/nixpkgs-bc8f8d1be58e8c8383e683a06e1e1e57893fff87.nix .nixpacks/nixpkgs-bc8f8d1be58e8c8383e683a06e1e1e57893fff87.nix heavy_check_mark emoji 48ms

Apr 28 17:58:20

[stage-0 4/10] RUN nix-env -if .nixpacks/nixpkgs-bc8f8d1be58e8c8383e683a06e1e1e57893fff87.nix && nix-collect-garbage -d

Apr 28 17:58:42

installing 'bc8f8d1be58e8c8383e683a06e1e1e57893fff87-env'

Apr 28 17:58:43

these 4 derivations will be built: /nix/store/5jh1vzmj6xg1srdp4pgi04iwhc1myinj-builder.pl.drv /nix/store/w9wjpgsiwxjv9p6166ax2mns747lmv2c-libraries.drv /nix/store/g3lchy17nx4gv4bw71jnpiinxs47bg4s-bc8f8d1be58e8c8383e683a06e1e1e57893fff87-env.drv /nix/store/b0x1xin8h03k1qlv2w60817zvams9drr-bc8f8d1be58e8c8383e683a06e1e1e57893fff87-env.drv

Apr 28 17:58:43

these 60 paths will be fetched (125.16 MiB download, 519.13 MiB unpacked):

Apr 28 17:58:43

/nix/store/0dglgnjm2s5qg4ar6m33lpclqig0kg2x-acl-2.3.2 /nix/store/j2v823114cc2dqfvprlcx9h7i941kknh-attr-2.5.2 /nix/store/mm0pa3z7kk6jh1i9rkxqxjqmd8h1qpxf-bash-5.2p37

Apr 28 17:58:43

/nix/store/pbixrqd120nnw8a0ygfpm3mnwlr1mbj7-binutils-2.43.1 /nix/store/ywxfq90ijq9kys4g5wzyrg2f4in0iphd-binutils-2.43.1-lib /nix/store/l13l2ipc1xn5npjrw511y0yfh4ghinmf-binutils-wrapper-2.43.1 /nix/store/6amvjdayglsifq4lb2lrj4q5gwf4dicd-bzip2-1.0.8 /nix/store/0kxxaix9l5dbih90491mv96zajsac57q-bzip2-1.0.8-bin /nix/store/sf6y4arqcm100rnnl3dhpg732i774zp6-coreutils-9.5

Apr 28 17:58:43

/nix/store/alq4bqllykgwrif112yqgrn9g001kn7b-diffutils-3.10 /nix/store/b1rvxspjrw0f3y5iz4pcygams0n9yas4-ed-1.20.2 /nix/store/zx2bmicmgjh0inkgffd7agxz47j4xxql-expand-response-params

Apr 28 17:58:43

/nix/store/cnmw0v80xbp4ldc79an5kb2p8a3ia6k5-expat-2.6.3

Apr 28 17:58:43

/nix/store/vkv9a83hknlnr7p2z8mwl16j5pb502gp-file-5.45 /nix/store/psjqqbj19n3fqssn38hgz4cv7b7a9alp-findutils-4.10.0 /nix/store/1cd3p3kjh9c209s7832z8i3b8qcqggca-gawk-5.3.1 /nix/store/v7dbfh5n7az2lcap0z1cv4jq0bikya8p-gcc-13.3.0 /nix/store/s94fwp43xhzkvw8l8nqslskib99yifzi-gcc-13.3.0-lib /nix/store/c91k93z9yr1cpia2pf5dr226imglrkg5-gcc-13.3.0-libgcc /nix/store/zls8qr49k7bkdfb9ncqz9w38q5m8zkld-gcc-13.3.0-man /nix/store/hgw57m0jh2w10jsv8x86ng267pm5sla8-gcc-wrapper-13.3.0 /nix/store/bhd4nlz0993jcsmp7b4fpgjyc9knh1yx-gcc-wrapper-13.3.0-man /nix/store/h9bcdwky1hznar341kl52g7hidcjxfdc-gdbm-1.24-lib /nix/store/3bvxjkkmwlymr0fssczhgi39c3aj1l7i-glibc-2.40-36 /nix/store/5571d6dklkwfcp1812dj4lxb0gl3w1yw-glibc-2.40-36-bin /nix/store/932dj5qwfzck90mnvqpd1f9hjqznaqdj-glibc-2.40-36-dev /nix/store/fbir2hb0b8b9n9by2qkmr4sjscds5017-gmp-6.3.0 /nix/store/i2bs001zwvii9qbhk6mm291gqybpij87-gmp-with-cxx-6.3.0 /nix/store/vcwb5qr1yjn3pwbm9gnmvqmn1gwg9a1y-gnu-config-2024-01-01

Apr 28 17:58:43

/nix/store/nysgss3ggh3dv7mz08n28h29lazxhyc1-gnugrep-3.11 /nix/store/iyrpqn6ana7j804dzis338n74kzznmj0-gnumake-4.4.1 /nix/store/13wxcn0j2wk911ahfkbvdq241rkprsv8-gnused-4.9

Apr 28 17:58:43

/nix/store/cqyjb712c5q3axw9qjij05dnji2a7z48-gnutar-1.35

Apr 28 17:58:43

/nix/store/qfc6wq1wpxvkkjqa6xr5685ip97qc3sr-gzip-1.13 /nix/store/1v4kdwh68m221n160qxy1dgw64mg5z30-isl-0.20

Apr 28 17:58:43

/nix/store/0qiyy7llb8ldillvlvjz1pyawhs5cvpk-libffi-3.4.6 /nix/store/3wjcy2waiy7cr1v0kvi73aj6i90d878d-libidn2-2.3.7

```


Status changed to Awaiting Railway Response Railway 11 months ago


swastikkaushal1
FREEOP

10 months ago

nixPkgs = ["python311Full", "cmake", "g++", "gcc", "make", "pkgconfig"]

[phases.setup]

cmds = [

"echo 'Setting up cmake symlink...'",

"ln -sf $(which cmake) /usr/local/bin/cmake",

"echo 'cmake symlink created!'"

]

[phases.install]

cmds = [

"pip install -r requirements.txt",

]

[phases.start]

cmds = [

"echo 'Starting the application...'",

"python app.py"

]

this is the code and error is this

"python app.py" did not complete successfully: exit code: 1

View in context

Traceback (most recent call last):

File "/app/app.py", line 1, in <module>

from flask import Flask, request, render_template, send_from_directory, redirect, url_for, flash,session , Response

ModuleNotFoundError: No module named 'flask'


echohack
EMPLOYEE

10 months ago

Looks like you need to declare a dependency on flask for the module path to resolve successfully. Give that a try?


Status changed to Awaiting User Response Railway 11 months ago


swastikkaushal1
FREEOP

10 months ago

Like see i am new to deploying , can you please a bit elabroate it will help me very much


Status changed to Awaiting Railway Response Railway 11 months ago


echohack
EMPLOYEE

10 months ago

Have you gone through some of our tutorials? If you can get that working, then I'm sure you can figure it out from there. https://docs.railway.com/guides/flask

In this case you don't have flask in your modules list, and you need that in your requirements.txt in order to function correctly.

from flask import Flask, request, render_template, send_from_directory, redirect, url_for, flash,session , Response

ModuleNotFoundError: No module named 'flask'


Status changed to Awaiting User Response Railway 10 months ago


Railway
BOT

7 months ago

This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!

Status changed to Solved Railway 7 months ago


Loading...