vip11017 commited on
Commit
ab90de8
·
1 Parent(s): 10b524a

add dockerfile

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