Spaces:
Runtime error
Runtime error
Update nyc_taxi_app.py
Browse files- nyc_taxi_app.py +6 -0
nyc_taxi_app.py
CHANGED
@@ -1,16 +1,22 @@
|
|
|
|
1 |
FROM python:3.10-slim
|
2 |
|
|
|
3 |
WORKDIR /app
|
4 |
|
|
|
5 |
COPY requirements.txt .
|
6 |
RUN pip install --no-cache-dir -r requirements.txt
|
7 |
|
|
|
8 |
COPY . .
|
9 |
|
|
|
10 |
ENV STREAMLIT_SERVER_HEADLESS=true
|
11 |
ENV STREAMLIT_SERVER_PORT=7860
|
12 |
ENV STREAMLIT_SERVER_ENABLECORS=false
|
13 |
ENV STREAMLIT_SERVER_ADDRESS=0.0.0.0
|
14 |
|
|
|
15 |
CMD ["streamlit", "run", "nyc_taxi_app.py"]
|
16 |
|
|
|
1 |
+
# Use a lightweight Python base image
|
2 |
FROM python:3.10-slim
|
3 |
|
4 |
+
# Set working directory
|
5 |
WORKDIR /app
|
6 |
|
7 |
+
# Install Python dependencies
|
8 |
COPY requirements.txt .
|
9 |
RUN pip install --no-cache-dir -r requirements.txt
|
10 |
|
11 |
+
# Copy the app code into the container
|
12 |
COPY . .
|
13 |
|
14 |
+
# Set Streamlit configuration environment variables
|
15 |
ENV STREAMLIT_SERVER_HEADLESS=true
|
16 |
ENV STREAMLIT_SERVER_PORT=7860
|
17 |
ENV STREAMLIT_SERVER_ENABLECORS=false
|
18 |
ENV STREAMLIT_SERVER_ADDRESS=0.0.0.0
|
19 |
|
20 |
+
# Launch the app
|
21 |
CMD ["streamlit", "run", "nyc_taxi_app.py"]
|
22 |
|