sakshee05 commited on
Commit
006ed0d
·
verified ·
1 Parent(s): 5e0225e

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -0
Dockerfile ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.12
2
+
3
+ # Set the working directory
4
+ WORKDIR /app
5
+
6
+ # Install dependencies
7
+ COPY requirements.txt ./
8
+ RUN pip install --no-cache-dir -r requirements.txt
9
+
10
+ # Install git-lfs (required for Hugging Face models if used)
11
+ RUN apt-get update && apt-get install -y git-lfs
12
+
13
+ # Copy application files
14
+ COPY . .
15
+
16
+ # Set Hugging Face cache directory
17
+ ENV HF_HOME="/app/huggingface"
18
+
19
+ # Expose the port required by Hugging Face
20
+ EXPOSE 7860
21
+
22
+ # Run FastAPI with Uvicorn (on port 7860 to match Hugging Face expectations)
23
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]