Upload folder using huggingface_hub
Browse files- Dockerfile +10 -21
- requirements.txt +3 -2
Dockerfile
CHANGED
|
@@ -1,32 +1,21 @@
|
|
| 1 |
-
FROM python:3.9
|
| 2 |
|
| 3 |
-
WORKDIR /
|
| 4 |
|
| 5 |
-
#
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
curl \
|
| 9 |
-
software-properties-common \
|
| 10 |
-
git \
|
| 11 |
-
&& rm -rf /var/lib/apt/lists/*
|
| 12 |
-
|
| 13 |
-
# Copy requirements first for better caching
|
| 14 |
-
COPY requirements.txt .
|
| 15 |
-
|
| 16 |
-
# Install Python dependencies
|
| 17 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
| 18 |
|
| 19 |
# Copy application files
|
| 20 |
-
COPY .
|
|
|
|
|
|
|
| 21 |
|
| 22 |
# Create data directory
|
| 23 |
-
RUN mkdir -p data
|
| 24 |
|
| 25 |
# Expose port
|
| 26 |
EXPOSE 8501
|
| 27 |
|
| 28 |
-
# Health check
|
| 29 |
-
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
|
| 30 |
-
|
| 31 |
# Run the application
|
| 32 |
-
|
|
|
|
| 1 |
+
FROM python:3.9
|
| 2 |
|
| 3 |
+
WORKDIR /code
|
| 4 |
|
| 5 |
+
# Copy requirements and install dependencies
|
| 6 |
+
COPY ./requirements.txt /code/requirements.txt
|
| 7 |
+
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
# Copy application files
|
| 10 |
+
COPY ./app.py /code/
|
| 11 |
+
COPY ./districts.txt /code/
|
| 12 |
+
COPY ./README.md /code/
|
| 13 |
|
| 14 |
# Create data directory
|
| 15 |
+
RUN mkdir -p /code/data
|
| 16 |
|
| 17 |
# Expose port
|
| 18 |
EXPOSE 8501
|
| 19 |
|
|
|
|
|
|
|
|
|
|
| 20 |
# Run the application
|
| 21 |
+
CMD ["streamlit", "run", "app.py", "--server.port", "8501", "--server.address", "0.0.0.0"]
|
requirements.txt
CHANGED
|
@@ -1,2 +1,3 @@
|
|
| 1 |
-
streamlit
|
| 2 |
-
pandas
|
|
|
|
|
|
| 1 |
+
streamlit==1.28.0
|
| 2 |
+
pandas==2.1.0
|
| 3 |
+
python-dateutil==2.8.2
|