generated from runpod-workers/worker-template
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile
24 lines (18 loc) · 875 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
ARG COG_REPO
ARG COG_MODEL
ARG COG_VERSION
FROM r8.im/${COG_REPO}/${COG_MODEL}@sha256:${COG_VERSION}
# Install necessary packages and Python 3.10
RUN apt-get update && apt-get upgrade -y && \
apt-get install -y --no-install-recommends software-properties-common curl git openssh-server && \
add-apt-repository ppa:deadsnakes/ppa -y && \
apt-get update && apt-get install -y --no-install-recommends python3.10 python3.10-dev python3.10-distutils && \
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1 &&\
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
python3 get-pip.py
# Create a virtual environment
RUN python3 -m venv /opt/venv
# Install runpod within the virtual environment
RUN /opt/venv/bin/pip install runpod
ADD src/handler.py /rp_handler.py
CMD ["/opt/venv/bin/python3", "-u", "/rp_handler.py"]