Update Dockerfile
Browse files- Dockerfile +11 -16
Dockerfile
CHANGED
@@ -1,20 +1,15 @@
|
|
1 |
-
|
|
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
# Instala git
|
6 |
-
RUN apt-get update && \
|
7 |
-
apt-get upgrade -y && \
|
8 |
-
apt-get install -y git
|
9 |
|
10 |
-
#
|
11 |
-
|
12 |
-
|
13 |
-
# Instala las dependencias
|
14 |
-
COPY requirements.txt ./requirements.txt
|
15 |
-
RUN pip install -r requirements.txt
|
16 |
|
17 |
-
#
|
18 |
-
|
19 |
|
20 |
-
|
|
|
|
1 |
+
# Use the official lightweight Python image.
|
2 |
+
FROM python:3.9-slim
|
3 |
|
4 |
+
# Allow statements and log messages to immediately appear in the Knative logs
|
5 |
+
ENV PYTHONUNBUFFERED True
|
|
|
|
|
|
|
|
|
6 |
|
7 |
+
# Copy local code to the container image.
|
8 |
+
WORKDIR /app
|
9 |
+
COPY . /app
|
|
|
|
|
|
|
10 |
|
11 |
+
# Install production dependencies.
|
12 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
13 |
|
14 |
+
# Run the web service on container startup.
|
15 |
+
CMD exec streamlit run app.py --server.enableCORS false --server.port $PORT
|