developer-lunark commited on
Commit
bbfbff4
·
verified ·
1 Parent(s): afdd271

Use NVIDIA CUDA base image for GPU support

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -5
Dockerfile CHANGED
@@ -1,16 +1,20 @@
1
- FROM python:3.11-slim
2
 
3
  WORKDIR /app
4
 
5
- # Fix OMP environment variable issue
6
  ENV OMP_NUM_THREADS=4
7
  ENV MKL_NUM_THREADS=4
 
8
 
9
- # Install system dependencies
10
  RUN apt-get update && apt-get install -y \
11
- build-essential \
 
 
12
  git \
13
- && rm -rf /var/lib/apt/lists/*
 
14
 
15
  # Copy requirements and install
16
  COPY requirements.txt .
 
1
+ FROM nvidia/cuda:12.1.0-runtime-ubuntu22.04
2
 
3
  WORKDIR /app
4
 
5
+ # Fix environment variables
6
  ENV OMP_NUM_THREADS=4
7
  ENV MKL_NUM_THREADS=4
8
+ ENV DEBIAN_FRONTEND=noninteractive
9
 
10
+ # Install Python and dependencies
11
  RUN apt-get update && apt-get install -y \
12
+ python3.11 \
13
+ python3-pip \
14
+ python3.11-venv \
15
  git \
16
+ && rm -rf /var/lib/apt/lists/* \
17
+ && ln -sf /usr/bin/python3.11 /usr/bin/python
18
 
19
  # Copy requirements and install
20
  COPY requirements.txt .