fugthchat commited on
Commit
c48eb55
·
verified ·
1 Parent(s): e730642

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -11
Dockerfile CHANGED
@@ -1,27 +1,21 @@
1
- # Use an NVIDIA CUDA image as the base
2
- FROM nvidia/cuda:12.1.1-devel-ubuntu22.04
3
 
4
  # Set the working directory in the container
5
  WORKDIR /code
6
 
7
- # Install Python, pip, and all required build tools in a single step
8
  RUN apt-get update && apt-get install -y --no-install-recommends \
9
- python3.10 \
10
- python3-pip \
11
  gcc \
12
  g++ \
13
  make \
14
  cmake \
15
  && rm -rf /var/lib/apt/lists/*
16
 
17
- # Set environment variables for GPU-accelerated build
18
- ENV CMAKE_ARGS="-DGGML_CUDA=on"
19
- ENV FORCE_CMAKE=1
20
-
21
  # Copy the requirements file and install dependencies
22
  COPY ./requirements.txt /code/requirements.txt
23
- RUN pip3 install --no-cache-dir --upgrade pip && \
24
- pip3 install --no-cache-dir -r /code/requirements.txt
25
 
26
  # Copy the application code
27
  COPY ./app.py /code/app.py
 
1
+ # Use a standard Python image
2
+ FROM python:3.10-slim
3
 
4
  # Set the working directory in the container
5
  WORKDIR /code
6
 
7
+ # Install build tools needed for llama-cpp-python (cmake is essential)
8
  RUN apt-get update && apt-get install -y --no-install-recommends \
 
 
9
  gcc \
10
  g++ \
11
  make \
12
  cmake \
13
  && rm -rf /var/lib/apt/lists/*
14
 
 
 
 
 
15
  # Copy the requirements file and install dependencies
16
  COPY ./requirements.txt /code/requirements.txt
17
+ RUN pip install --no-cache-dir --upgrade pip && \
18
+ pip install --no-cache-dir -r /code/requirements.txt
19
 
20
  # Copy the application code
21
  COPY ./app.py /code/app.py