Spaces:
Sleeping
Sleeping
Update DOCKERFILE.py
Browse files- DOCKERFILE.py +17 -9
DOCKERFILE.py
CHANGED
@@ -16,18 +16,26 @@ RUN pip install --upgrade pip &&\
|
|
16 |
pip config set global.index-url https://pypi.python.org/simple
|
17 |
|
18 |
# Copy the requirements file and install dependencies
|
19 |
-
COPY requirements.txt
|
20 |
-
|
21 |
-
|
|
|
22 |
|
23 |
-
#
|
24 |
WORKDIR /app
|
25 |
|
26 |
-
# Copy the
|
27 |
COPY . /app
|
28 |
|
29 |
-
#
|
30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
|
32 |
-
#
|
33 |
-
ENTRYPOINT ["
|
|
|
|
16 |
pip config set global.index-url https://pypi.python.org/simple
|
17 |
|
18 |
# Copy the requirements file and install dependencies
|
19 |
+
COPY requirements.txt
|
20 |
+
|
21 |
+
# Use an official Python runtime as a parent image
|
22 |
+
FROM python:3.9-slim
|
23 |
|
24 |
+
# Set the working directory in the container
|
25 |
WORKDIR /app
|
26 |
|
27 |
+
# Copy the current directory contents into the container at /app
|
28 |
COPY . /app
|
29 |
|
30 |
+
# Install any needed packages specified in requirements.txt
|
31 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
32 |
+
|
33 |
+
# Make port 8501 available to the world outside this container
|
34 |
+
EXPOSE 8501
|
35 |
+
|
36 |
+
# Define environment variable
|
37 |
+
ENV STREAMLIT_SERVER_PORT=8501
|
38 |
|
39 |
+
# Run streamlit when the container launches
|
40 |
+
ENTRYPOINT ["streamlit", "run", "app.py"]
|
41 |
+
CMD ["--server.port=8501"]
|