Hi, I am trying to run a serverless runpod instance with a docker image.
This is my dockerfile:
# Base image -> https://github.com/runpod/containers/blob/main/official-templates/base/Dockerfile# DockerHub -> https://hub.docker.com/r/runpod/base/tagsFROM runpod/base:0.6.2-cuda12.2.0# The base image comes with many system dependencies pre-installed to help you get started quickly.# Please refer to the base image's Dockerfile for more information before adding additional dependencies.# IMPORTANT: The base image overrides the default huggingface cache location.# --- Optional: System dependencies ---# COPY builder/setup.sh /setup.sh# RUN /bin/bash /setup.sh && \# rm /setup.sh# Python dependenciesCOPY builder/requirements.txt /requirements.txtRUN python3.11 -m pip install --upgrade pip && \ python3.11 -m pip install --upgrade -r /requirements.txt --no-cache-dir && \ rm /requirements.txt# NOTE: The base image comes with multiple Python versions pre-installed.# It is reccommended to specify the version of Python when running your code.# Add src files (Worker Template)ADD src .RUN python3.11 -m pip install runpodCMD python3.11 -u /handler.py
# Base image -> https://github.com/runpod/containers/blob/main/official-templates/base/Dockerfile# DockerHub -> https://hub.docker.com/r/runpod/base/tagsFROM runpod/base:0.6.2-cuda12.2.0# The base image comes with many system dependencies pre-installed to help you get started quickly.# Please refer to the base image's Dockerfile for more information before adding additional dependencies.# IMPORTANT: The base image overrides the default huggingface cache location.# --- Optional: System dependencies ---# COPY builder/setup.sh /setup.sh# RUN /bin/bash /setup.sh && \# rm /setup.sh# Python dependenciesCOPY builder/requirements.txt /requirements.txtRUN python3.11 -m pip install --upgrade pip && \ python3.11 -m pip install --upgrade -r /requirements.txt --no-cache-dir && \ rm /requirements.txt# NOTE: The base image comes with multiple Python versions pre-installed.# It is reccommended to specify the version of Python when running your code.# Add src files (Worker Template)ADD src .RUN python3.11 -m pip install runpodCMD python3.11 -u /handler.py
When the handler runs,
import runpod
import runpod
errors out as
ModuleNotFoundError: No module named 'runpod'
ModuleNotFoundError: No module named 'runpod'
Anyone experienced this before?
Recent Announcements
Continue the conversation
Join the Discord to ask follow-up questions and connect with the community
R
Runpod
We're a community of enthusiasts, engineers, and enterprises, all sharing insights on AI, Machine Learning and GPUs!