kouki321 commited on
Commit
1508cdd
·
verified ·
1 Parent(s): 09a4f9b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -13
Dockerfile CHANGED
@@ -1,22 +1,21 @@
1
- # Base image
2
  FROM python:3.10-slim
3
 
4
- # Install system dependencies\ nRUN apt-get update && \
5
- RUN apt-get update && \
6
- apt-get install -y git && \
7
- rm -rf /var/lib/apt/lists/*
8
-
9
- # Copy and install Python dependencies
10
- COPY requirements.txt /app/requirements.txt
11
- RUN pip install --no-cache-dir -r /app/requirements.txt
12
 
13
  # Set working directory
14
  WORKDIR /app
15
- COPY app.py /app/app.py
16
 
 
 
 
 
 
 
17
 
18
- # Expose port (Gradio/Streamlit default)
19
  EXPOSE 7860
20
 
21
- # Launch
22
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
1
  FROM python:3.10-slim
2
 
3
+ # Set environment variables for Transformers cache
4
+ ENV TRANSFORMERS_CACHE=/app/cache
5
+ ENV HF_HOME=/app/cache
 
 
 
 
 
6
 
7
  # Set working directory
8
  WORKDIR /app
 
9
 
10
+ # Install Python dependencies
11
+ COPY requirements.txt .
12
+ RUN pip install --no-cache-dir -r requirements.txt
13
+
14
+ # Copy application code and model
15
+ COPY . .
16
 
17
+ # Expose Streamlit or FastAPI port (change if you're not using 7860)
18
  EXPOSE 7860
19
 
20
+ # Run your app
21
+ CMD ["python", "app.py"]