2 years ago
I did a simple fastapi project. It works on my computer. I think I did everything correctly. I don't understand why this fails on build. Thank you.
ⓘ Deployment information is only viewable by project members and Railway employees.
4 Replies
2 years ago
Mind sharing your build logs?
https://bookmarklets.up.railway.app/log-downloader/
2 years ago
[Region: us-west1]
=========================
Using Detected Dockerfile
=========================
context: df24b9f744701f0a75c58c857330105e
#0 building with "default" instance using docker driver
#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 504B done
#1 DONE 0.0s
#2 [internal] load metadata for docker.io/library/python:3.9-slim
#2 DONE 0.2s
#3 [internal] load .dockerignore
#3 transferring context: 2B done
#3 DONE 0.0s
#4 [1/5] FROM docker.io/library/python:3.9-slim@sha256:990eb8f30571e0aaabfa1a7deb9fe2f6c1d4163a389004fbf823db6fee7c3642
#4 DONE 0.0s
#5 [internal] load build context
#5 transferring context: 5.18kB 0.0s done
#5 DONE 0.0s
#6 [2/5] WORKDIR /app
#6 CACHED
#7 [3/5] COPY requirements.lock /app/requirements.lock
#7 CACHED
#8 [4/5] RUN pip install -r requirements.lock
#8 2.128 Obtaining file:///. (from -r requirements.lock (line 12))
#8 2.128 ERROR: file:///. (from -r requirements.lock (line 12)) does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found.
#8 2.279
#8 2.279 [notice] A new release of pip is available: 23.0.1 -> 24.2
#8 2.279 [notice] To update, run: pip install --upgrade pip
#8 ERROR: process "/bin/sh -c pip install -r requirements.lock" did not complete successfully: exit code: 1
-----
> [4/5] RUN pip install -r requirements.lock:
2.128 Obtaining file:///. (from -r requirements.lock (line 12))
2.128 ERROR: file:///. (from -r requirements.lock (line 12)) does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found.
2.279
2.279 [notice] A new release of pip is available: 23.0.1 -> 24.2
2.279 [notice] To update, run: pip install --upgrade pip
-----
Dockerfile:9
-------------------
7 | # Copia il file delle dipendenze e installale
8 | COPY requirements.lock /app/requirements.lock
9 | >>> RUN pip install -r requirements.lock
10 |
11 | # Copia tutto il contenuto della directory corrente nella directory di lavoro del container
-------------------
ERROR: failed to solve: process "/bin/sh -c pip install -r requirements.lock" did not complete successfully: exit code: 1
2 years ago
You need a requirements.txt or pyproject.toml or setup.py
More info: https://nixpacks.com/docs/providers/python
2 years ago
Thank you. I have requirements.php and pyproject.toml