ThEyAtH commited on
Commit
ec7849a
·
1 Parent(s): a4dcf69

fix dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -9
Dockerfile CHANGED
@@ -1,15 +1,18 @@
1
- FROM python:3.11-slim # base image to start from
2
 
3
- RUN apt-get install -y git # run a shell command
 
 
 
 
4
 
5
- WORKDIR /app # set working directory
6
 
7
- COPY requirements.txt . # copy file from your computer → container
 
8
 
9
- RUN pip install -r requirements.txt
10
 
11
- COPY . . # copy everything else
12
 
13
- EXPOSE 7860 # open this port
14
-
15
- CMD ["uvicorn", "main:app"] # command to run when container starts
 
1
+ FROM python:3.11-slim
2
 
3
+ RUN apt-get update && apt-get install -y \
4
+ libspatialindex-dev \
5
+ gcc \
6
+ g++ \
7
+ && rm -rf /var/lib/apt/lists/*
8
 
9
+ WORKDIR /app
10
 
11
+ COPY requirements.txt .
12
+ RUN pip install --no-cache-dir -r requirements.txt
13
 
14
+ COPY . .
15
 
16
+ EXPOSE 7860
17
 
18
+ CMD ["uvicorn", "backend.api.server:app", "--host", "0.0.0.0", "--port", "7860"]