Jofthomas HF staff commited on
Commit
9d69895
1 Parent(s): 34b853e

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -3
Dockerfile CHANGED
@@ -3,13 +3,22 @@ FROM python:3.10.9
3
  # Install ffmpeg and any other required packages
4
  RUN apt-get update && apt-get install -y ffmpeg
5
 
6
- # Copy all files into the container
7
- COPY . /app
8
-
9
  # Set the working directory
10
  WORKDIR /app
11
 
 
 
 
12
  # Install Python dependencies
13
  RUN pip install --no-cache-dir --upgrade -r requirements.txt
14
 
 
 
 
 
 
 
 
 
 
15
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
3
  # Install ffmpeg and any other required packages
4
  RUN apt-get update && apt-get install -y ffmpeg
5
 
 
 
 
6
  # Set the working directory
7
  WORKDIR /app
8
 
9
+ # Copy all files into the container
10
+ COPY . .
11
+
12
  # Install Python dependencies
13
  RUN pip install --no-cache-dir --upgrade -r requirements.txt
14
 
15
+ # Set permissions for unidic
16
+ RUN mkdir -p /usr/local/lib/python3.10/site-packages/unidic \
17
+ && chmod -R 777 /usr/local/lib/python3.10/site-packages/unidic
18
+
19
+ # Resolve numba caching issue by setting the NUMBA_CACHE_DIR environment variable
20
+ ENV NUMBA_CACHE_DIR=/tmp/numba_cache
21
+ RUN mkdir -p /tmp/numba_cache \
22
+ && chmod -R 777 /tmp/numba_cache
23
+
24
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]