moustafa1-1 commited on
Commit
0b9e281
·
verified ·
1 Parent(s): b75dc06

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -14
Dockerfile CHANGED
@@ -37,7 +37,7 @@ ENV BLIS_ARCH="generic"
37
  # Try to agree to the Coqui TTS license via environment variable
38
  ENV COQUI_TTS_AGREED=1
39
 
40
- # Install Coqui TTS requirements (within the TTS directory)
41
  RUN . /app/venv/bin/activate && pip install -r requirements.txt --timeout=300
42
 
43
  # Explicitly install the TTS package itself in editable mode
@@ -67,23 +67,14 @@ COPY web /app/web
67
  # Copy the application code
68
  COPY local_server_new.py /app/
69
 
70
- # Create a minimal requirements file for the web app in /app/
71
- RUN echo "fastapi==0.109.2" > /app/requirements_web.txt && \
72
- echo "uvicorn==0.34.0" >> /app/requirements_web.txt && \
73
- echo "torch==2.1.0" >> /app/requirements_web.txt && \
74
- echo "torchaudio==2.1.0" >> /app/requirements_web.txt && \
75
- echo "transformers==4.35.2" >> /app/requirements_web.txt && \
76
- echo "unidecode>=1.3.8" >> /app/requirements_web.txt && \
77
- echo "librosa" >> /app/requirements_web.txt && \
78
- echo "blis==0.2.4" >> /app/requirements_web.txt # Try pinning blis here
79
-
80
- # Install the minimal web app dependencies
81
- RUN . /app/venv/bin/activate && pip install -r /app/requirements_web.txt --no-cache-dir --timeout=600
82
 
83
  # Disable numba caching
84
  ENV NUMBA_DISABLE_CACHE=1
85
 
86
- # Clear numba and llvmlite cache (Let's keep this for now)
87
  RUN rm -rf /app/venv/lib/python3.9/site-packages/numba/__pycache__ /app/venv/lib/python3.9/site-packages/llvmlite/__pycache__
88
 
89
  # Create start.sh script
 
37
  # Try to agree to the Coqui TTS license via environment variable
38
  ENV COQUI_TTS_AGREED=1
39
 
40
+ # Install Coqui TTS requirements
41
  RUN . /app/venv/bin/activate && pip install -r requirements.txt --timeout=300
42
 
43
  # Explicitly install the TTS package itself in editable mode
 
67
  # Copy the application code
68
  COPY local_server_new.py /app/
69
 
70
+ # Install your other dependencies (fastapi, uvicorn, bangla, etc.)
71
+ COPY requirements.txt /app/
72
+ RUN . /app/venv/bin/activate && pip install -r /app/requirements.txt --no-cache-dir --timeout=300
 
 
 
 
 
 
 
 
 
73
 
74
  # Disable numba caching
75
  ENV NUMBA_DISABLE_CACHE=1
76
 
77
+ # Clear numba and llvmlite cache (Let's keep this for now, though it might not be needed)
78
  RUN rm -rf /app/venv/lib/python3.9/site-packages/numba/__pycache__ /app/venv/lib/python3.9/site-packages/llvmlite/__pycache__
79
 
80
  # Create start.sh script