Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +6 -9
Dockerfile
CHANGED
@@ -9,26 +9,23 @@ 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 |
-
|
|
|
|
|
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 gemma3
|
31 |
-
|
32 |
EXPOSE 8501
|
33 |
|
34 |
-
|
|
|
|
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 && pip install --upgrade pip
|
13 |
+
|
14 |
+
# Install Ollama
|
15 |
+
RUN curl -fsSL https://ollama.com/install.sh | sh
|
16 |
|
17 |
# Create app directory
|
18 |
WORKDIR /app
|
19 |
|
|
|
20 |
COPY requirements.txt .
|
21 |
RUN pip install -r requirements.txt
|
22 |
|
|
|
23 |
COPY . .
|
24 |
|
25 |
# Ensure the custom interface is in place
|
|
|
26 |
RUN wget -O src/custome_interface.py https://huggingface.co/Jzuluaga/accent-id-commonaccent_xlsr-en-english/resolve/main/custom_interface.py
|
27 |
|
|
|
|
|
|
|
28 |
EXPOSE 8501
|
29 |
|
30 |
+
# Start Ollama and your app together
|
31 |
+
CMD bash -c "ollama serve & sleep 5 && ollama pull gemma3 && streamlit run streamlit_app.py --server.port=8501 --server.address=0.0.0.0"
|