swajall commited on
Commit
f8a578d
·
verified ·
1 Parent(s): 2f62939

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -17
Dockerfile CHANGED
@@ -1,17 +1,21 @@
1
- # Dockerfile
2
- FROM python:3.10-slim
3
-
4
- WORKDIR /app
5
-
6
- # Install dependencies
7
- COPY requirements.txt .
8
- RUN pip install --no-cache-dir -r requirements.txt
9
-
10
- # Copy app code
11
- COPY api.py .
12
-
13
- # Expose port 7860 (Hugging Face Spaces expects this)
14
- EXPOSE 7860
15
-
16
- # Run the FastAPI app
17
- CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
 
 
 
1
+ # Dockerfile
2
+ FROM python:3.10-slim
3
+
4
+ WORKDIR /app
5
+
6
+ # Install dependencies
7
+ COPY requirements.txt .
8
+ RUN pip install --no-cache-dir -r requirements.txt
9
+
10
+ # Copy app code
11
+ COPY api.py .
12
+
13
+ # Expose port 7860 (Hugging Face Spaces expects this)
14
+ EXPOSE 7860
15
+
16
+ # Run the FastAPI app
17
+ CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "7860"]
18
+
19
+ ENV TRANSFORMERS_CACHE=/app/hf_cache
20
+ ENV HF_HOME=/app/hf_home
21
+ RUN mkdir -p /app/hf_cache /app/hf_home