forked from bananaml/demo-whisper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (27 loc) · 816 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Base image for Banana model builds
FROM pytorch/pytorch:1.11.0-cuda11.3-cudnn8-runtime
WORKDIR /
# Install git
RUN apt-get update && apt-get install -y git
# Install additional python packages
# torch is already installed in this image
RUN pip3 install --upgrade pip
ADD requirements.txt requirements.txt
RUN pip3 install -r requirements.txt
# Add your model weight files
# (in this case we have a python script)
ADD utils.py .
ADD download.py .
RUN python3 download.py
# Add the rest of your code
ADD . .
# Set environment variables passed in during build
ARG AWS_BUCKET
ARG AWS_ACCESS_KEY_ID
ARG AWS_SECRET_ACCESS_KEY
ENV AWS_BUCKET=$AWS_BUCKET
ENV AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID
ENV AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY
EXPOSE 8000
# Start the app in the container
CMD python3 -u app.py