chrisxx commited on
Commit
7f0a276
·
1 Parent(s): 48c2402

Use CUDA base image for better GPU compatibility

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -4
Dockerfile CHANGED
@@ -1,12 +1,19 @@
1
- FROM python:3.11-slim
2
 
3
- WORKDIR /app
4
-
5
- # Install system dependencies
6
  RUN apt-get update && apt-get install -y \
 
 
 
7
  build-essential \
8
  && rm -rf /var/lib/apt/lists/*
9
 
 
 
 
 
 
 
10
  # Copy requirements and install Python dependencies
11
  COPY requirements.txt .
12
  RUN pip install --no-cache-dir -r requirements.txt
 
1
+ FROM nvidia/cuda:12.1.0-runtime-ubuntu22.04
2
 
3
+ # Install Python 3.11
 
 
4
  RUN apt-get update && apt-get install -y \
5
+ python3.11 \
6
+ python3.11-dev \
7
+ python3-pip \
8
  build-essential \
9
  && rm -rf /var/lib/apt/lists/*
10
 
11
+ # Create symlinks for python and pip
12
+ RUN ln -s /usr/bin/python3.11 /usr/bin/python && \
13
+ ln -s /usr/bin/pip3 /usr/bin/pip
14
+
15
+ WORKDIR /app
16
+
17
  # Copy requirements and install Python dependencies
18
  COPY requirements.txt .
19
  RUN pip install --no-cache-dir -r requirements.txt