Add build-essential and upgrade pip to ensure packages install correctly
Browse files- Dockerfile +5 -4
Dockerfile
CHANGED
|
@@ -1,18 +1,19 @@
|
|
| 1 |
FROM nvidia/cuda:12.1.0-base-ubuntu22.04
|
| 2 |
|
| 3 |
-
# Install Python 3.11 and
|
| 4 |
RUN apt-get update && \
|
| 5 |
-
apt-get install -y python3.11 python3.11-
|
| 6 |
ln -sf /usr/bin/python3.11 /usr/bin/python && \
|
| 7 |
ln -sf /usr/bin/pip3 /usr/bin/pip && \
|
|
|
|
| 8 |
rm -rf /var/lib/apt/lists/*
|
| 9 |
|
| 10 |
WORKDIR /app
|
| 11 |
|
| 12 |
# Install dependencies
|
| 13 |
COPY requirements.txt .
|
| 14 |
-
RUN pip install --no-cache-dir -r requirements.txt \
|
| 15 |
-
|
| 16 |
|
| 17 |
# Copy source code
|
| 18 |
COPY . .
|
|
|
|
| 1 |
FROM nvidia/cuda:12.1.0-base-ubuntu22.04
|
| 2 |
|
| 3 |
+
# Install Python 3.11, pip, and build tools
|
| 4 |
RUN apt-get update && \
|
| 5 |
+
apt-get install -y python3.11 python3.11-dev python3-pip build-essential && \
|
| 6 |
ln -sf /usr/bin/python3.11 /usr/bin/python && \
|
| 7 |
ln -sf /usr/bin/pip3 /usr/bin/pip && \
|
| 8 |
+
pip install --upgrade pip setuptools wheel && \
|
| 9 |
rm -rf /var/lib/apt/lists/*
|
| 10 |
|
| 11 |
WORKDIR /app
|
| 12 |
|
| 13 |
# Install dependencies
|
| 14 |
COPY requirements.txt .
|
| 15 |
+
RUN pip install --no-cache-dir -r requirements.txt && \
|
| 16 |
+
rm -rf ~/.cache/pip
|
| 17 |
|
| 18 |
# Copy source code
|
| 19 |
COPY . .
|