ayureasehealthcare commited on
Commit
5c69859
·
verified ·
1 Parent(s): 3273230

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +16 -10
Dockerfile CHANGED
@@ -1,16 +1,22 @@
1
- FROM python:3.10
 
2
 
3
- WORKDIR /code
 
4
 
5
- # Avoid permission errors
6
- ENV TRANSFORMERS_CACHE=/tmp \
7
- HF_HOME=/tmp \
8
- HF_HUB_CACHE=/tmp \
9
- PYTHONUNBUFFERED=1
10
 
11
- COPY requirements.txt .
12
- RUN pip install --no-cache-dir -r requirements.txt
 
13
 
14
- COPY ./app ./app
 
 
15
 
 
 
 
 
16
  CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ # Base image
2
+ FROM python:3.10-slim
3
 
4
+ # Install system dependencies
5
+ RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
6
 
7
+ # Set working directory
8
+ WORKDIR /app
 
 
 
9
 
10
+ # Copy app files
11
+ COPY ./app /app/app
12
+ COPY ./app/requirements.txt /app/requirements.txt
13
 
14
+ # Install Python dependencies
15
+ RUN pip install --upgrade pip
16
+ RUN pip install -r requirements.txt
17
 
18
+ # Expose port
19
+ EXPOSE 7860
20
+
21
+ # Start server
22
  CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]