youngjeck commited on
Commit
2010e3f
·
verified ·
1 Parent(s): 132e595

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -5
Dockerfile CHANGED
@@ -1,16 +1,16 @@
1
  FROM python:3.11-slim
2
 
3
- # Create app directory
 
 
4
  WORKDIR /app
5
 
6
- # Copy requirements first so Docker can cache this step
7
  COPY requirements.txt .
8
-
9
- # Install dependencies
10
  RUN pip install --no-cache-dir -r requirements.txt
11
 
12
  # Copy the rest of your app
13
  COPY . .
14
 
15
- # Run FastAPI
16
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
  FROM python:3.11-slim
2
 
3
+ # Set a writable Hugging Face cache directory
4
+ ENV TRANSFORMERS_CACHE=/tmp/huggingface
5
+
6
  WORKDIR /app
7
 
8
+ # Copy and install dependencies
9
  COPY requirements.txt .
 
 
10
  RUN pip install --no-cache-dir -r requirements.txt
11
 
12
  # Copy the rest of your app
13
  COPY . .
14
 
15
+ # Run the app
16
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]