How to use "uv run" by astral in railway? Is it possible?

jaogarcia-novare
HOBBY

3 days ago

I'm using uv for running my project. Is it possible to use this during railway deployment?

Solved$10 Bounty

5 Replies

Railway
BOT

3 days ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!



markwitt1
PRO

3 days ago

It should just work out of the box if a uv.lock is detected. Maybe try using Railpack instead of nixpacks


uxuz

Hey, this is possible https://railpack.com/languages/python/#package-managers.

jaogarcia-novare
HOBBY

3 days ago

Thank you! It worked!

For first time railway users reading this, just go to the service's settings > Under build > change the Nixpacks (default) to Railpack

If you're using Gitlab make sure to do this first in your project's CLI:

  1. Create Empty Service

  2. Under Build Settings, change Nixpacks to Railpack.

  3. Install Railway: bash <(curl -fsSL cli.new)

  4. Login to Railway: railway login

  5. Initialize Railway project: railway init

  6. Push your code to railway: railway up


markwitt1

It should just work out of the box if a uv.lock is detected. Maybe try using Railpack instead of nixpacks

jaogarcia-novare
HOBBY

3 days ago

Thanks this is the right solution. As long as you do "uv init" everything will go smoothly. Railpack worked!


Status changed to Solved uxuz โ€ข 3 days ago


How to use "uv run" by astral in railway? Is it possible? - Railway Help Station