acecalisto3 commited on
Commit
ef2a016
·
verified ·
1 Parent(s): 81feab9

Update DOCKERFILE.py

Browse files
Files changed (1) hide show
  1. 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 /app/requirements.txt
20
- WORKDIR /app
21
- RUN pip install --no-cache-dir -r requirements.txt
 
22
 
23
- # Change the working directory
24
  WORKDIR /app
25
 
26
- # Copy the rest of the codebase files
27
  COPY . /app
28
 
29
- # Expose the port number
30
- EXPOSE 5000
 
 
 
 
 
 
31
 
32
- # Define entrypoint script
33
- ENTRYPOINT ["python", "./app.py"]
 
 
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"]