ariji1 commited on
Commit
4507e80
·
verified ·
1 Parent(s): 17258ad

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -9
Dockerfile CHANGED
@@ -3,20 +3,23 @@ FROM python:3.10-slim
3
  # Set working directory
4
  WORKDIR /code
5
 
6
- # Install basic OS tools
7
- RUN apt-get update && apt-get install -y wget && rm -rf /var/lib/apt/lists/*
 
 
 
 
 
8
 
9
- # Copy files
10
  COPY . .
11
 
12
- # Install Python deps
13
- RUN pip install --no-cache-dir -r requirements.txt
14
-
15
- # Make start.sh executable
16
- RUN chmod +x /code/start.sh
17
 
18
  # Expose FastAPI port
19
  EXPOSE 7860
20
 
21
- # Start app
22
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
3
  # Set working directory
4
  WORKDIR /code
5
 
6
+ # Install basic OS tools and build dependencies for llama-cpp-python
7
+ RUN apt-get update \
8
+ && apt-get install -y --no-install-recommends \
9
+ wget \
10
+ build-essential \
11
+ cmake \
12
+ && rm -rf /var/lib/apt/lists/*
13
 
14
+ # Copy project files
15
  COPY . .
16
 
17
+ # Install Python dependencies
18
+ RUN pip install --no-cache-dir -U pip wheel setuptools \
19
+ && pip install --no-cache-dir -r requirements.txt
 
 
20
 
21
  # Expose FastAPI port
22
  EXPOSE 7860
23
 
24
+ # Start the FastAPI app
25
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]