R
RunPod•4w ago
Ryan

Pod Unable to Start Docker Container

I've tested this Docker image on my local computer and other servers, however on Runpod it seems to be stuck in a loop displaying "start container". Is this an issue others have encountered before?
No description
15 Replies
nerdylive
nerdylive•4w ago
No, except your pods has a notice that it has any problems So it's should be a problem with your docker image May I see your dockerfile
Ryan
Ryan•4w ago
# Use the official Python image from the Docker Hub
FROM python:3.9-slim

# Set the working directory in the container
WORKDIR /app

# Install required packages
RUN pip install requests pytube tqdm youtube-search-python

# Copy the rest of the working directory contents into the container at /app
COPY . .

# Define environment variables for default parameters
ENV SERVER_URL="[REDACTED]"
ENV NUM_ITERATIONS=500
ENV NUM_THREADS=30
ENV NUM_INSTANCES=5

# Function to run the main script
CMD ["sh", "-c", "\
echo Starting container... && \
SERVER_URL=${SERVER_URL:-[REDACTED]} && \
NUM_ITERATIONS=${NUM_ITERATIONS:-25} && \
NUM_THREADS=${NUM_THREADS:-30} && \
NUM_INSTANCES=${NUM_INSTANCES:-5} && \
for i in $(seq 1 $NUM_INSTANCES); do \
echo Starting instance $i... && \
python [REDACTED].py $SERVER_URL $NUM_ITERATIONS --threads $NUM_THREADS & \
done && \
wait"]
# Use the official Python image from the Docker Hub
FROM python:3.9-slim

# Set the working directory in the container
WORKDIR /app

# Install required packages
RUN pip install requests pytube tqdm youtube-search-python

# Copy the rest of the working directory contents into the container at /app
COPY . .

# Define environment variables for default parameters
ENV SERVER_URL="[REDACTED]"
ENV NUM_ITERATIONS=500
ENV NUM_THREADS=30
ENV NUM_INSTANCES=5

# Function to run the main script
CMD ["sh", "-c", "\
echo Starting container... && \
SERVER_URL=${SERVER_URL:-[REDACTED]} && \
NUM_ITERATIONS=${NUM_ITERATIONS:-25} && \
NUM_THREADS=${NUM_THREADS:-30} && \
NUM_INSTANCES=${NUM_INSTANCES:-5} && \
for i in $(seq 1 $NUM_INSTANCES); do \
echo Starting instance $i... && \
python [REDACTED].py $SERVER_URL $NUM_ITERATIONS --threads $NUM_THREADS & \
done && \
wait"]
i appreciate the help!
nerdylive
nerdylive•4w ago
Is server url accessible from the pod
Ryan
Ryan•4w ago
yep it should be
nerdylive
nerdylive•4w ago
Maybe all the process has ended? What's wait for? Waiting all process to finish? Try to add more logging into your python file
Ryan
Ryan•4w ago
yeah ill give it a shot oh to note, this docker file is being specifed through templetes
Ryan
Ryan•4w ago
No description
nerdylive
nerdylive•4w ago
Try using sleep infinity instead of wait if it keep restarting
Ryan
Ryan•4w ago
its my understanding that the container start command is not requred if there's a dockerfile present?
nerdylive
nerdylive•4w ago
Yes It adds using cmd only
Ryan
Ryan•4w ago
hmmm i think runpod may actully not be the best choice, due to other circumstances on second thought ill come back to this thread if things change, but thanks for the help!
nerdylive
nerdylive•4w ago
Alright
Madiator2011
Madiator2011•4w ago
I would save it as sh script and bake into container then set CMD command to start sh script
justin
justin•4w ago
https://github.com/justinwlin/Runpod-GPU-And-Serverless-Base If you want an easy way to launch, I'd say just add your requirements here. But there multiple stuff going on mainly that you need to have more stuff than just a basic python docker container. But gl with whatever other solution you end up using! 🙂 It does seem like just looking at your requirements and guessing, you basically prob want to use a cpu pod serverless, to do some yt stuff
haris
haris•4w ago
Would love to hear what your use case is and why we might not be the best choice
Want results from more Discord servers?
Add your server
More Posts
How can I install a Docker image on RunPod?I had a chat with the maintainer of aphrodite-engine and he said I shouldn't use the existing RunPodCPU Only Pods, Through RunpodctlHeyo! Is there a way to create cpu only pods through runpodctl? I don't see a flag for cpu type, butcan 3 different serverless workers running from same network volume?Hi @digigoblin I have checked your answer about symbol linking network volume dir to serverless dUnable to create template or pod with python sdk version 1.6.2```python import runpod import os runpod.api_key = os.getenv("RUNPOD_API_KEY") try: # CreatinCan serverless endpoints make outbound TCP connections?I know endpoints can make http/https requests but is there any limit on outbound connections? Is thPod unable to read environment variables set in templates caused a lossHi, this issue has caused us to create over 70 pods that are running idle, the pods did nothing.n00b multi gpu questionHello hello! I created a 4 gpu pod (screenshot), then asked pytorch what devices it saw, and it jusVery slow cold start timesDoes anyone know why I would get such variable cold start times, anything from half a second to 90 sUploading a file to network volume takes forever and fails after a few minsI'm trying to upload a checkpoint file which is about 650MB, and the upload speed is about 5~10MB peCannot run Cmdr+ on serverless, CohereForCausalLM not supportedI'm getting this error for all Cmdr+ models on serverless: ```Error initializing vLLM engine: Model