ash-171 commited on
Commit
5344d27
·
verified ·
1 Parent(s): 56babd9

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -31
Dockerfile CHANGED
@@ -1,40 +1,18 @@
1
- # Base image with GPU support
2
- FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04
3
 
4
- ENV DEBIAN_FRONTEND=noninteractive
5
- ENV PYTHONDONTWRITEBYTECODE=1
6
- ENV PYTHONUNBUFFERED=1
7
-
8
- # Install Python and dependencies
9
- RUN apt-get update && apt-get install -y \
10
- python3 python3-pip ffmpeg curl git wget sudo \
11
- && rm -rf /var/lib/apt/lists/*
12
-
13
- # Fix Python path and upgrade pip
14
- RUN ln -sf /usr/bin/python3 /usr/bin/python && pip install --upgrade pip
15
-
16
- # Install Ollama (must be as root to write to /usr/local/bin)
17
- RUN curl -L https://ollama.com/download/OllamaLinux -o /usr/local/bin/ollama && \
18
- chmod +x /usr/local/bin/ollama
19
-
20
- # Create app directory
21
  WORKDIR /app
22
 
23
- # Copy code
24
- COPY . .
25
 
26
- # Download model interface
27
- RUN wget -O src/custome_interface.py https://huggingface.co/Jzuluaga/accent-id-commonaccent_xlsr-en-english/resolve/main/custom_interface.py
28
 
29
  # Install Python dependencies
30
- RUN pip install -r requirements.txt
31
 
32
- # Expose Streamlit port
33
  EXPOSE 8501
34
 
35
- # Start everything
36
- CMD bash -c "\
37
- ollama serve & \
38
- sleep 10 && \
39
- ollama pull gemma3 && \
40
- streamlit run streamlit_app.py --server.port=8501 --server.address=0.0.0.0"
 
1
+ FROM python:3.10-slim
 
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  WORKDIR /app
4
 
5
+ # Install ffmpeg for pydub
6
+ RUN apt-get update && apt-get install -y ffmpeg git && rm -rf /var/lib/apt/lists/*
7
 
8
+ # Copy source code
9
+ COPY . .
10
 
11
  # Install Python dependencies
12
+ RUN pip install --no-cache-dir -r requirements.txt
13
 
14
+ # Expose port for Streamlit
15
  EXPOSE 8501
16
 
17
+ # Run Streamlit app
18
+ CMD ["streamlit", "run", "streamlit_app.py", "--server.port=8501", "--server.enableCORS=false"]