ksumhs commited on
Commit
2191dbc
·
verified ·
1 Parent(s): dbb9ae7

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -16
Dockerfile CHANGED
@@ -1,46 +1,36 @@
1
- # ============================
2
- # Base Image
3
- # ============================
4
  FROM python:3.10-slim
5
 
6
- # Prevent Python from buffering stdout
7
  ENV PYTHONUNBUFFERED=1
8
 
9
  # ============================
10
- # Install System Dependencies
11
  # ============================
12
  RUN apt-get update && apt-get install -y \
13
  git \
14
  cmake \
15
  build-essential \
16
- libgl1-mesa-glx \
17
  libglib2.0-0 \
18
  && rm -rf /var/lib/apt/lists/*
19
 
20
  # ============================
21
- # Working Directory
22
  # ============================
23
  WORKDIR /app
24
 
25
  # ============================
26
- # Copy Requirements
27
  # ============================
28
  COPY requirements.txt /app/requirements.txt
29
-
30
- # Install Python dependencies
31
  RUN pip install --no-cache-dir -r requirements.txt
32
 
33
  # ============================
34
- # Copy Application Files
35
  # ============================
36
  COPY . /app
37
 
38
  # ============================
39
- # Expose Port
40
  # ============================
41
  EXPOSE 7860
42
-
43
- # ============================
44
- # Start FastAPI Server
45
- # ============================
46
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
 
 
1
  FROM python:3.10-slim
2
 
 
3
  ENV PYTHONUNBUFFERED=1
4
 
5
  # ============================
6
+ # Install Dependencies
7
  # ============================
8
  RUN apt-get update && apt-get install -y \
9
  git \
10
  cmake \
11
  build-essential \
12
+ libgl1 \
13
  libglib2.0-0 \
14
  && rm -rf /var/lib/apt/lists/*
15
 
16
  # ============================
17
+ # Workdir
18
  # ============================
19
  WORKDIR /app
20
 
21
  # ============================
22
+ # Install Requirements
23
  # ============================
24
  COPY requirements.txt /app/requirements.txt
 
 
25
  RUN pip install --no-cache-dir -r requirements.txt
26
 
27
  # ============================
28
+ # Copy Application
29
  # ============================
30
  COPY . /app
31
 
32
  # ============================
33
+ # Expose + Command
34
  # ============================
35
  EXPOSE 7860
 
 
 
 
36
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]