File size: 684 Bytes
98f0633
ea6da0f
 
3c4f4d6
 
ea6da0f
2b18f9a
e255f7c
ea6da0f
 
 
 
98f0633
 
 
 
cf78cd2
 
 
 
98f0633
 
 
 
 
 
 
 
 
 
f0dc920
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
# 
FROM nvidia/cuda:12.4.1-runtime-ubuntu22.04

USER root

# Install python and pip
RUN apt-get update && apt-get install -y python3 python3-pip \
    && apt-get install -y git

# The commands as another prerequisite
RUN pip install --upgrade pip
RUN pip install --upgrade git+https://github.com/huggingface/transformers.git accelerate datasets[audio]

# 
WORKDIR /code

RUN mkdir -p /app/.cache
RUN chmod -R 777 /app/.cache
ENV HUGGINGFACE_CACHE_DIR=/app/.cache

# 
COPY ./requirements.txt /code/requirements.txt

# 
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt

# 
COPY ./app /code/app

# 
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]