File size: 532 Bytes
b111f5d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
Bootstrap: docker
From: alpine:latest

%environment
  export PATH="$PATH:/usr/local/bin"

%post
  mkdir /app

  # Install Python and pip
  apk add --update --no-cache python3

  python3 -m venv /app/venv

  # activate the virtual environment
  . /app/venv/bin/activate

  # Install dependencies
  echo "Installing Python dependencies..."
  # pip install numpy
  pip install torch torchvision torchaudio lightning tensorboard pycocotools matplotlib

%runscript
  . /app/venv/bin/activate
  # echo "This is the runscript"
  exec "$@"