File size: 712 Bytes
6c0ac6b
 
683e9cd
 
6c0ac6b
40b10b7
692d290
6c0ac6b
9d69895
 
 
692d290
40b10b7
6c0ac6b
9d69895
 
 
 
 
 
 
 
 
683e9cd
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
FROM python:3.10.9

# Install ffmpeg and any other required packages
RUN apt-get update && apt-get install -y ffmpeg

# Set the working directory
WORKDIR /app

# Copy all files into the container
COPY . .

# Install Python dependencies
RUN pip install --no-cache-dir --upgrade -r requirements.txt

# Set permissions for unidic
RUN mkdir -p /usr/local/lib/python3.10/site-packages/unidic \
    && chmod -R 777 /usr/local/lib/python3.10/site-packages/unidic

# Resolve numba caching issue by setting the NUMBA_CACHE_DIR environment variable
ENV NUMBA_CACHE_DIR=/tmp/numba_cache
RUN mkdir -p /tmp/numba_cache \
    && chmod -R 777 /tmp/numba_cache

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