ajoy0071998 commited on
Commit
56b0d1f
·
verified ·
1 Parent(s): fa1309a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +2 -9
Dockerfile CHANGED
@@ -1,24 +1,17 @@
1
  FROM python:3.12.8-slim
2
 
3
- # Set working directory
4
  WORKDIR /app
5
 
6
- # Copy requirements and install dependencies
7
  COPY requirements.txt .
8
  RUN pip install --no-cache-dir -r requirements.txt
9
 
10
- # Create a writable cache directory for Hugging Face models
11
  RUN mkdir -p /app/cache && chmod -R 777 /app/cache
12
  ENV TRANSFORMERS_CACHE=/app/cache
13
 
14
- # Create additional directories if your app needs them
15
- RUN mkdir -p chroma_langchain_db data upload
16
-
17
- # Copy the rest of the application code
18
  COPY . .
19
 
20
- # Expose the port (used by Spaces or locally)
21
  EXPOSE 7860
22
 
23
- # Start the FastAPI app
24
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
  FROM python:3.12.8-slim
2
 
 
3
  WORKDIR /app
4
 
 
5
  COPY requirements.txt .
6
  RUN pip install --no-cache-dir -r requirements.txt
7
 
8
+ # Setup Hugging Face cache directory
9
  RUN mkdir -p /app/cache && chmod -R 777 /app/cache
10
  ENV TRANSFORMERS_CACHE=/app/cache
11
 
12
+ # Copy all app files
 
 
 
13
  COPY . .
14
 
 
15
  EXPOSE 7860
16
 
 
17
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]