Python Deployment Docker build failed

So I am trying to deploy a python script to railway, I have the Procfile setup etc, but no matter what I try it always fails after downloading the requirements with this error:
#12 [stage-0 8/11] RUN --mount=type=cache,id=s/815fda66-24b2-40a3-aedd-3bfcb3975bd7-/root/cache/pip,target=/root/.cache/pip python -m venv --copies /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt

#12 0.100 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/11] RUN --mount=type=cache,id=s/815fda66-24b2-40a3-aedd-3bfcb3975bd7-/root/cache/pip,target=/root/.cache/pip python -m venv --copies /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt:

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

-----



Dockerfile:28

-------------------

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

27 | COPY . /app/.

28 | >>> RUN --mount=type=cache,id=s/815fda66-24b2-40a3-aedd-3bfcb3975bd7-/root/cache/pip,target=/root/.cache/pip python -m venv --copies /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt

29 |

30 |

-------------------



ERROR: failed to solve: 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



Error: Docker build failed
#12 [stage-0 8/11] RUN --mount=type=cache,id=s/815fda66-24b2-40a3-aedd-3bfcb3975bd7-/root/cache/pip,target=/root/.cache/pip python -m venv --copies /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt

#12 0.100 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/11] RUN --mount=type=cache,id=s/815fda66-24b2-40a3-aedd-3bfcb3975bd7-/root/cache/pip,target=/root/.cache/pip python -m venv --copies /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt:

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

-----



Dockerfile:28

-------------------

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

27 | COPY . /app/.

28 | >>> RUN --mount=type=cache,id=s/815fda66-24b2-40a3-aedd-3bfcb3975bd7-/root/cache/pip,target=/root/.cache/pip python -m venv --copies /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt

29 |

30 |

-------------------



ERROR: failed to solve: 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



Error: Docker build failed
2 Replies
Percy
Percy3mo ago
Project ID: 815fda66-24b2-40a3-aedd-3bfcb3975bd7,815fda66-24b2-40a3-aedd-3bfcb3975bd7,815fda66-24b2-40a3-aedd-3bfcb3975bd7
Idekdude
IdekdudeOP3mo ago
I dont have a custom build command or anything, I left everything alone solved
Want results from more Discord servers?
Add your server