Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +6 -3
Dockerfile
CHANGED
@@ -8,7 +8,7 @@ RUN apt-get update && \
|
|
8 |
procps \
|
9 |
git \
|
10 |
wget \
|
11 |
-
lsof && \
|
12 |
rm -rf /var/lib/apt/lists/*
|
13 |
|
14 |
# Set working directory
|
@@ -18,7 +18,7 @@ WORKDIR /app
|
|
18 |
COPY requirements.txt .
|
19 |
COPY src/ ./src/
|
20 |
COPY *.py ./
|
21 |
-
COPY execute.sh ./execute.sh
|
22 |
|
23 |
# Install Python dependencies
|
24 |
RUN pip install --no-cache-dir -r requirements.txt
|
@@ -30,10 +30,13 @@ ENV PYTHONPATH=/app
|
|
30 |
RUN mkdir -p /root/.ollama
|
31 |
|
32 |
# Expose ports for both Streamlit and Ollama
|
33 |
-
EXPOSE
|
34 |
|
35 |
# Make sure execute.sh is executable
|
36 |
RUN chmod +x ./execute.sh
|
37 |
|
|
|
|
|
|
|
38 |
# Set the entrypoint
|
39 |
ENTRYPOINT ["./execute.sh"]
|
|
|
8 |
procps \
|
9 |
git \
|
10 |
wget \
|
11 |
+
lsof && \
|
12 |
rm -rf /var/lib/apt/lists/*
|
13 |
|
14 |
# Set working directory
|
|
|
18 |
COPY requirements.txt .
|
19 |
COPY src/ ./src/
|
20 |
COPY *.py ./
|
21 |
+
COPY execute.sh ./execute.sh
|
22 |
|
23 |
# Install Python dependencies
|
24 |
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
30 |
RUN mkdir -p /root/.ollama
|
31 |
|
32 |
# Expose ports for both Streamlit and Ollama
|
33 |
+
EXPOSE 80 # Hugging Face requires the app to listen on port 80
|
34 |
|
35 |
# Make sure execute.sh is executable
|
36 |
RUN chmod +x ./execute.sh
|
37 |
|
38 |
+
# Adjust execute.sh to start Streamlit on port 80
|
39 |
+
RUN sed -i 's/--server.port 8501/--server.port 80/g' execute.sh
|
40 |
+
|
41 |
# Set the entrypoint
|
42 |
ENTRYPOINT ["./execute.sh"]
|