Spaces:
Build error
Build error
Update DOCKERFILE.py
Browse files- DOCKERFILE.py +9 -17
DOCKERFILE.py
CHANGED
|
@@ -16,26 +16,18 @@ 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 |
-
FROM python:3.9-slim
|
| 23 |
|
| 24 |
-
#
|
| 25 |
WORKDIR /app
|
| 26 |
|
| 27 |
-
# Copy the
|
| 28 |
COPY . /app
|
| 29 |
|
| 30 |
-
#
|
| 31 |
-
|
| 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 |
-
#
|
| 40 |
-
ENTRYPOINT ["
|
| 41 |
-
CMD ["--server.port=8501"]
|
|
|
|
| 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"]
|
|
|