Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runpod docker credentials not working when using image_id from private repository #4269

Closed
alita-moore opened this issue Nov 6, 2024 · 13 comments · Fixed by #4287
Closed

Comments

@alita-moore
Copy link

Because runpod doesn't support docker I need to use my docker image as the base image_id but setting the SKYPILOT_DOCKER_USERNAME and SKYPILOT_DOCKER_PASSWORD doesn't allow the created runpod to have access to the private repo. However, if you manually change the dockerhub config on the runpod web UI (which I setup beforehand) it works fine. Is there a way to authenticate the docker image for the created pod automatically?

For reference here's my config:

resources:
  image_id: docker:teamwoven/convert:sultan-1.0
  cloud: runpod
  ports: 8000
  accelerators: RTX4090:1

service:
  readiness_probe: /status

envs:
  SKYPILOT_DOCKER_USERNAME:
  SKYPILOT_DOCKER_PASSWORD:
  SKYPILOT_DOCKER_SERVER: docker.io

setup: |
  #

run: |
  # Run the FastAPI server with two workers
  /home/woven/.local/bin/uvicorn extractor_inference.app:app --host "0.0.0.0" --port 8000 --workers 2

and then an image of the runpod UI that I'm referring to:
Screenshot 2024-11-07 at 5 18 01 AM

Version & Commit info:

  • sky -v: skypilot, version 0.7.0
  • sky -c: 3f62588
@alita-moore
Copy link
Author

also unrelated but it would be nice to be able to specify multiple cloud providers in the yaml

@concretevitamin
Copy link
Member

also unrelated but it would be nice to be able to specify multiple cloud providers in the yaml

This is supported; check out https://skypilot.readthedocs.io/en/latest/examples/auto-failover.html#multiple-candidate-resources.

@alita-moore alita-moore changed the title runpod docker credentials not setting for loading for using image_id from private repository runpod docker credentials working when using image_id from private repository Nov 6, 2024
@alita-moore alita-moore changed the title runpod docker credentials working when using image_id from private repository runpod docker credentials not working when using image_id from private repository Nov 6, 2024
@alita-moore
Copy link
Author

Got it, thanks. Any idea about the docker credentials?

@Michaelvll
Copy link
Collaborator

It can be an issue with our pumping for the docker credentials for RunPod specifically. cc'ing @cblmemo for a look.

@cblmemo
Copy link
Collaborator

cblmemo commented Nov 7, 2024

Yes, this is due to we directly setting the image id to create pod instead of using the DockerInitializer. A solution would be manually calling the runpod credential API if env variables is detected. Will submit a PR to fix this.

@alita-moore
Copy link
Author

@cblmemo how can I help get this resolved? I'm happy to contribute however needed :)

@cblmemo
Copy link
Collaborator

cblmemo commented Dec 27, 2024

@cblmemo how can I help get this resolved? I'm happy to contribute however needed :)

Thanks for pinging! I'll take a look today. Could you share which docker registry are you using right now? This can help us debug :))

@alita-moore
Copy link
Author

thank you! I'm using dockerhub right now for the ML images.

@cblmemo
Copy link
Collaborator

cblmemo commented Dec 27, 2024

thank you! I'm using dockerhub right now for the ML images.

Thanks for the information! #4287 should work now. I tested with AWS ECR and it mostly works well except for some runpod api issue. Are you interested to test it out?

@alita-moore
Copy link
Author

Sure thing, is it in the latest version of sky or do I need to do something different?

@cblmemo
Copy link
Collaborator

cblmemo commented Dec 29, 2024

Sure thing, is it in the latest version of sky or do I need to do something different?

Try installing from source and checkout this branch:

git clone https://github.com/skypilot-org/skypilot.git
cd skypilot
git switch runpod-docker-login
pip install -e ".[all]"

@alita-moore
Copy link
Author

sorry about that! I've been very busy recently, do you still need me to test it out?

@cblmemo
Copy link
Collaborator

cblmemo commented Jan 10, 2025

sorry about that! I've been very busy recently, do you still need me to test it out?

We've already tested and merged it! Now it should be available on the nightly build. Feel free to try it out and see if that resolves your requirement!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants