rishab1090 commited on
Commit
79587e7
·
verified ·
1 Parent(s): 43b0288

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -7
Dockerfile CHANGED
@@ -1,22 +1,21 @@
1
  FROM tensorflow/tensorflow:2.15.0
2
 
 
 
3
  WORKDIR /app
4
 
5
- # Environment flags
6
  ENV PYTHONDONTWRITEBYTECODE=1
7
  ENV PYTHONUNBUFFERED=1
8
  ENV TF_USE_LEGACY_KERAS=1
9
 
10
- # Copy files
11
  COPY . .
12
-
13
- # Ensure model is readable
14
  RUN chmod 644 /app/2.h5
15
 
16
- # Install dependencies
17
- RUN pip install --no-cache-dir --upgrade pip && \
18
- pip install --no-cache-dir -r requirements.txt
19
 
20
  EXPOSE 7860
21
 
22
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
1
  FROM tensorflow/tensorflow:2.15.0
2
 
3
+ # Don't use slim version! Full version has tf.keras bundled.
4
+
5
  WORKDIR /app
6
 
 
7
  ENV PYTHONDONTWRITEBYTECODE=1
8
  ENV PYTHONUNBUFFERED=1
9
  ENV TF_USE_LEGACY_KERAS=1
10
 
 
11
  COPY . .
 
 
12
  RUN chmod 644 /app/2.h5
13
 
14
+ # Install dependencies (no tensorflow here!)
15
+ RUN pip install --no-cache-dir --upgrade pip \
16
+ && pip install --no-cache-dir -r requirements.txt
17
 
18
  EXPOSE 7860
19
 
20
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
21
+