forked from runpod-workers/worker-github_runner
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (34 loc) · 1.44 KB
/
Dockerfile
File metadata and controls
44 lines (34 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Base image
FROM nvidia/cuda:11.7.1-cudnn8-runtime-ubuntu20.04
# Use bash shell with pipefail option
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Set the working directory
WORKDIR /
# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive
ENV RUNNER_ALLOW_RUNASROOT=1
# GitHub runner version argument
ARG RUNNER_VERSION=2.305.0
# Update and upgrade the system packages (Worker Template)
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y --no-install-recommends \
curl libssl-dev libffi-dev openssh-server python3 python3-dev python3-pip && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Install Python dependencies (Worker Template)
COPY builder/requirements.txt /requirements.txt
RUN --mount=type=cache,target=/root/.cache/pip \
pip install --upgrade pip && \
pip install --upgrade -r /requirements.txt --no-cache-dir && \
rm /requirements.txt
# cd into the user directory, download and unzip the github actions runner
RUN mkdir actions-runner && cd actions-runner \
&& curl -O -L https://github.com/actions/runner/releases/download/v${RUNNER_VERSION}/actions-runner-linux-x64-${RUNNER_VERSION}.tar.gz \
&& tar xzf ./actions-runner-linux-x64-${RUNNER_VERSION}.tar.gz && \
rm -rf ./actions-runner-linux-x64-${RUNNER_VERSION}.tar.gz
# install some additional dependencies
RUN /actions-runner/bin/installdependencies.sh
# Add src files (Worker Template)
ADD src .
CMD python3 -u /handler.py