How to use "uv run" by astral in railway? Is it possible?
jaogarcia-novare
HOBBYOP

a year ago

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

Solved$10 Bounty

Pinned Solution

markwitt1
PRO

a year ago

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

5 Replies

Railway
BOT

a year 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

a year 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
HOBBYOP

a year 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
HOBBYOP

a year 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 11 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...