HemanthR007 commited on
Commit
f3ef2e2
·
verified ·
1 Parent(s): e8bbc66

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +19 -0
Dockerfile CHANGED
@@ -1,3 +1,9 @@
 
 
 
 
 
 
1
  RUN apt-get update && apt-get install -y \
2
  git \
3
  git-lfs \
@@ -9,3 +15,16 @@ RUN apt-get update && apt-get install -y \
9
  libgl1 \
10
  && rm -rf /var/lib/apt/lists/* \
11
  && git lfs install
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ # Set working directory
4
+ WORKDIR /code
5
+
6
+ # Install system dependencies
7
  RUN apt-get update && apt-get install -y \
8
  git \
9
  git-lfs \
 
15
  libgl1 \
16
  && rm -rf /var/lib/apt/lists/* \
17
  && git lfs install
18
+
19
+ # Install Python dependencies
20
+ COPY requirements.txt .
21
+ RUN pip install --no-cache-dir -r requirements.txt
22
+
23
+ # Copy app files
24
+ COPY . .
25
+
26
+ # Expose port
27
+ EXPOSE 7860
28
+
29
+ # Run FastAPI app with uvicorn
30
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]