logasja commited on
Commit
65c7dbd
·
1 Parent(s): c4128ad

Updated build for new tensorflow library and docker image

Browse files
Files changed (2) hide show
  1. Dockerfile +6 -16
  2. requirements.txt +2 -2
Dockerfile CHANGED
@@ -1,32 +1,22 @@
1
- FROM python:3.7-slim as builder
2
 
3
  RUN apt update && \
4
- apt install --no-install-recommends -y build-essential gcc
5
 
6
  COPY requirements.txt /requirements.txt
7
 
8
  RUN python -m pip install --upgrade pip && \
9
- pip install --no-cache-dir --no-warn-script-location --user -r requirements.txt && \
10
- pip install --no-cache-dir --no-warn-script-location --user typing-extensions -U
11
 
12
  # Stage 2: Runtime
13
- FROM nvidia/cuda:11.0.3-cudnn8-runtime
14
  ENV GRADIO_SERVER_NAME=0.0.0.0
15
  ENV TZ=America/New_York
16
 
17
- RUN rm /etc/apt/sources.list.d/cuda.list && \
18
- rm /etc/apt/sources.list.d/nvidia-ml.list
19
-
20
- RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
21
-
22
  RUN apt update && \
23
- apt purge -y python3 python && \
24
- apt install --no-install-recommends -y build-essential software-properties-common libgl1-mesa-glx && \
25
- add-apt-repository -y ppa:deadsnakes/ppa && \
26
- apt install --no-install-recommends -y python3.7 python3.7-distutils && \
27
- update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 2 && \
28
  apt clean && rm -rf /var/lib/apt/lists/*
29
- COPY --from=builder /root/.local/lib/python3.7/site-packages /usr/local/lib/python3.7/dist-packages
30
  COPY app.py app.py
31
 
32
  CMD ["python3", "-u", "app.py"]
 
1
+ FROM python:3.8-slim as builder
2
 
3
  RUN apt update && \
4
+ apt install --no-install-recommends -y build-essential gcc git
5
 
6
  COPY requirements.txt /requirements.txt
7
 
8
  RUN python -m pip install --upgrade pip && \
9
+ pip install --no-cache-dir --no-warn-script-location --user -r requirements.txt
 
10
 
11
  # Stage 2: Runtime
12
+ FROM tensorflow/tensorflow:2.13.0-gpu
13
  ENV GRADIO_SERVER_NAME=0.0.0.0
14
  ENV TZ=America/New_York
15
 
 
 
 
 
 
16
  RUN apt update && \
17
+ apt install --no-install-recommends -y libgl1-mesa-glx && \
 
 
 
 
18
  apt clean && rm -rf /var/lib/apt/lists/*
19
+ COPY --from=builder /root/.local/lib/python3.8/site-packages /usr/local/lib/python3.8/dist-packages
20
  COPY app.py app.py
21
 
22
  CMD ["python3", "-u", "app.py"]
requirements.txt CHANGED
@@ -1,2 +1,2 @@
1
- gradio==3.21.0
2
- fawkes==1.0.4
 
1
+ gradio>=3.21.0
2
+ fawkes @ git+https://github.com/logasja/fawkes@master