mahmoudsaber0 commited on
Commit
fd980af
·
verified ·
1 Parent(s): 1097772

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -16
Dockerfile CHANGED
@@ -1,16 +1,14 @@
1
- FROM python:3.10-slim
2
-
3
- WORKDIR /app
4
-
5
- # Copy and install dependencies
6
- COPY requirements.txt .
7
- RUN pip install --no-cache-dir -r requirements.txt
8
-
9
- # Copy your app code
10
- COPY . .
11
-
12
- # Expose the port Hugging Face expects
13
- EXPOSE 7860
14
-
15
- # Run the FastAPI app with uvicorn
16
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ FROM python:3.10-slim
2
+
3
+ WORKDIR /app
4
+
5
+ COPY requirements.txt .
6
+ RUN pip install --no-cache-dir -r requirements.txt
7
+
8
+ # ✅ Create a writable cache folder
9
+ RUN mkdir -p /tmp/huggingface && chmod -R 777 /tmp/huggingface
10
+
11
+ COPY . .
12
+
13
+ EXPOSE 7860
14
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]