Mr-Help commited on
Commit
aa32412
Β·
verified Β·
1 Parent(s): 6c47eef

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -12
Dockerfile CHANGED
@@ -1,20 +1,14 @@
1
- # Use official Python image
2
  FROM python:3.9
3
 
4
- # Set working directory
5
  WORKDIR /app
6
-
7
- # Copy project files
8
  COPY . /app
9
 
10
- # Install dependencies
11
- RUN pip install --no-cache-dir -r requirements.txt
12
-
13
- # Cache dir for transformers
14
- ENV TRANSFORMERS_CACHE=/app/cache
15
  RUN mkdir -p /app/cache && chmod 777 /app/cache
16
 
17
- # 🚫 Ω…ΩΩŠΨ΄ EXPOSE ΩˆΩ„Ψ§ uvicorn
 
 
18
 
19
- # Run the script
20
- CMD ["python", "main.py"]
 
 
1
  FROM python:3.9
2
 
 
3
  WORKDIR /app
 
 
4
  COPY . /app
5
 
6
+ # Hugging Face cache (Ψ¨Ψ―ΩŠΩ„ TRANSFORMERS_CACHE)
7
+ ENV HF_HOME=/app/cache
 
 
 
8
  RUN mkdir -p /app/cache && chmod 777 /app/cache
9
 
10
+ RUN pip install --no-cache-dir -r requirements.txt
11
+
12
+ EXPOSE 7860
13
 
14
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]