Python requirements installation seems to time out (?) as busy
vintagedave
HOBBYOP

a year ago

Hello!

I'm deploying a new service to Railway; this one has never been on Railway before. I have a fairly short requirements.txt of 8 items -- but some of them do take a while to install:

aiohttp==3.8.5
falcon==3.1.3
newspaper3k==0.2.8
openai==1.50.2
pydantic==2.9.2
pymupdf==1.24.10
SQLAlchemy==2.0.20
uvicorn==0.31.0

When I deploy, it ticks away for a while and then says that failed some time ago (eg, 'failed 84 seconds ago'). The logs look like the following. I'm not sure what to make of it, but "Text file busy: '/opt/venv/bin/python'" hints to me something is not right with the virtual environment that is being installed for Python.

One other weird thing. I configured with Python as the provider, and have a setup line to invoke pip to install via requirements.txt. But when I clicked Deploy, I saw a second Python appear in the provider list, so there were two of them listed in the providers field. Is it possible there's a bug somewhere? Is it running Python twice?

Logs:

11 [stage-0 7/13] COPY . /app/.

11 DONE 0.1s

12 [stage-0 8/13] RUN --mount=type=cache,id=s/44d261cd-ab9c-4b45-bc89-f4781502407f-/root/cache/pip,target=/root/.cache/pip python -m venv --copies /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt

12 0.116 Error: [Errno 26] Text file busy: '/opt/venv/bin/python'

12 ERROR: process "/bin/bash -ol pipefail -c python -m venv --copies /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt" did not complete successfully: exit code: 1

[stage-0 8/13] RUN --mount=type=cache,id=s/44d261cd-ab9c-4b45-bc89-f4781502407f-/root/cache/pip,target=/root/.cache/pip python -m venv --copies /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt:

0.116 Error: [Errno 26] Text file busy: '/opt/venv/bin/python'

Dockerfile:28

26 | ENV NIXPACKSPATH=/opt/venv/bin:$NIXPACKSPATH

27 | COPY . /app/.

28 | >>> RUN --mount=type=cache,id=s/44d261cd-ab9c-4b45-bc89-f4781502407f-/root/cache/pip,target=/root/.cache/pip python -m venv --copies /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt

Many thanks,

David

View Deploy details

ⓘ Deployment information is only viewable by project members and Railway employees.

Solved

1 Replies

brody
EMPLOYEE

a year ago

Looks like you solved that issue and now are facing an issue with your own code. Going to close this out.


Loading...