ash-171 commited on
Commit
efe6c24
·
verified ·
1 Parent(s): 2204900

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +25 -12
Dockerfile CHANGED
@@ -1,21 +1,34 @@
1
- FROM python:3.9-slim
2
 
3
- WORKDIR /app
 
 
4
 
 
5
  RUN apt-get update && apt-get install -y \
6
- build-essential \
7
- curl \
8
- software-properties-common \
9
- git \
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
- COPY requirements.txt ./
13
- COPY src/ ./src/
 
 
 
14
 
15
- RUN pip3 install -r requirements.txt
 
 
16
 
17
- EXPOSE 8501
 
18
 
19
- HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
 
 
 
 
 
 
 
20
 
21
- ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
 
1
+ FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04
2
 
3
+ ENV DEBIAN_FRONTEND=noninteractive
4
+ ENV PYTHONDONTWRITEBYTECODE=1
5
+ ENV PYTHONUNBUFFERED=1
6
 
7
+ # Install Python and dependencies
8
  RUN apt-get update && apt-get install -y \
9
+ python3 python3-pip ffmpeg curl git wget \
 
 
 
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
+ RUN ln -s /usr/bin/python3 /usr/bin/python
13
+ RUN pip install --upgrade pip
14
+
15
+ # Create app directory
16
+ WORKDIR /app
17
 
18
+ # Copy requirements and install
19
+ COPY requirements.txt .
20
+ RUN pip install -r requirements.txt
21
 
22
+ # Copy the app code into the image
23
+ COPY . .
24
 
25
+ # Ensure the custom interface is in place
26
+ # Optional as already in src/, but ensures it's updated
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
+ # Pulling LLaMA model (optional pre-pull)
30
+ RUN curl -fsSL https://ollama.com/install.sh | sh && ollama pull llama3.1
31
+
32
+ EXPOSE 8501
33
 
34
+ CMD ["streamlit", "run", "streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]