#how do you create a compatible docker file?

19 messages · Page 1 of 1 (latest)

gray vector
#

I want to run a custom docker file, but I'm not sure how to make one that's compatible.

for example when I use this to create an image that's saved to my registry, the pod seems to start but I can't connect to it over ssh. I noticed that if I picked an official pytorch pod I had checkmarks for ssh and jupter lab, but not if I use my custom one. What's the minimal dockerfile I need to run?

FROM pytorch/pytorch:2.2.2-cuda12.1-cudnn8-runtime

RUN apt-get update --yes && \
    apt install --yes --no-install-recommends git wget curl bash libgl1 software-properties-common openssh-server nginx && \
    apt-get autoremove -y && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/* && \
    echo "en_US.UTF-8 UTF-8" > /etc/locale.gen

EXPOSE 8888
EXPOSE 22
pallid vortex
#

I just made one u can take a look here that is meant for testing on gpu pod before deploying on serverless. but u could just ignore the “serverless” pod if u want

#

expose port 8888 for http for jupyter notebook, and expose port 22 for tcp

#

The way I recommend to make it compatible is use a runpod pytorch template as a base

#

And comes with a lot of additional bonus stuff

#

I usually start with pytorch runpod template on gpu pod, run through some steps manually, and then basically start with a FROM from runpod template, and add what i ran manually

pallid vortex
random pewter
pallid vortex
#

^yea, u need to install openssh. why if u use the runpod template as basis ull get to skip a lot of annoying stuff

gray vector
#

when I use FROM runpod/pytorch:2.2.1-py3.10-cuda12.1.1-devel-ubuntu22.04 I get this error when trying to use the gpu locally.

UserWarning: CUDA initialization: Unexpected error from cudaGetDeviceCount(). Did you run some cuda functions before calling NumCudaDevices() that might have already set an error? Error 804: forward compatibility was attempted on non supported HW (Triggered internally at ../c10/cuda/CUDAFunctions.cpp:109.)

I don't get that error when using the official pytorch image. Have you seen that before?

dusky harbor
#

It's most likely that your system is running on cuda version older than 12.1

random pewter
#

yeah use the cuda filter and select 12.1 and later

knotty dust
#

@random pewter though the user tries to run local 😄

random pewter
#

Lol

random pewter
wheat spindle
random pewter
#

Oh yeah