MrA7A commited on
Commit
de08086
·
verified ·
1 Parent(s): 9cb3267

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +2 -8
Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- FROM python:3.9-slim-bookworm # Changed from buster to bookworm
2
 
3
  # Set environment variables
4
  ENV PYTHONUNBUFFERED=1 \
@@ -7,10 +7,8 @@ ENV PYTHONUNBUFFERED=1 \
7
  HF_DATASETS_CACHE="/tmp/hf_cache/datasets" \
8
  SENTENCE_TRANSFORMERS_HOME="/tmp/hf_cache/sentence_transformers"
9
 
10
- # Create app directory
11
  WORKDIR /app
12
 
13
- # Install system dependencies for llama-cpp-python
14
  RUN apt-get update && apt-get install -y --no-install-recommends \
15
  build-essential \
16
  cmake \
@@ -18,15 +16,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
18
  git \
19
  && rm -rf /var/lib/apt/lists/*
20
 
21
- # Copy requirements file and install Python dependencies
22
  COPY requirements.txt .
23
  RUN pip install --no-cache-dir -r requirements.txt
24
 
25
- # Copy application code
26
  COPY . .
27
 
28
- # Expose the port FastAPI will run on
29
  EXPOSE 7860
30
 
31
- # Command to run the application
32
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ FROM python:3.9-slim-bullseye
2
 
3
  # Set environment variables
4
  ENV PYTHONUNBUFFERED=1 \
 
7
  HF_DATASETS_CACHE="/tmp/hf_cache/datasets" \
8
  SENTENCE_TRANSFORMERS_HOME="/tmp/hf_cache/sentence_transformers"
9
 
 
10
  WORKDIR /app
11
 
 
12
  RUN apt-get update && apt-get install -y --no-install-recommends \
13
  build-essential \
14
  cmake \
 
16
  git \
17
  && rm -rf /var/lib/apt/lists/*
18
 
 
19
  COPY requirements.txt .
20
  RUN pip install --no-cache-dir -r requirements.txt
21
 
 
22
  COPY . .
23
 
 
24
  EXPOSE 7860
25
 
26
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]