Spaces:
Sleeping
Sleeping
File size: 918 Bytes
dc5de08 e11b0ef dc5de08 31a570f dc5de08 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# Use an official Python runtime as a parent image
FROM python:3.10
# Set the working directory in the container
WORKDIR /app
# Change permissions to allow all users to write to the /app directory
RUN chmod 777 /app
# Install system dependencies
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libpq-dev \
gcc \
gdal-bin \
libgdal-dev \
python3-gdal \
&& rm -rf /var/lib/apt/lists/*
# Set environment variables for GDAL
ENV GDAL_CONFIG=/usr/bin/gdal-config
ENV CPLUS_INCLUDE_PATH=/usr/include/gdal
ENV C_INCLUDE_PATH=/usr/include/gdal
# Copy the local files to the container
COPY . .
# Install Python dependencies
RUN pip install --no-cache-dir --upgrade pip \
&& pip install --no-cache-dir -r requirements.txt
# Expose the port Streamlit will run on
EXPOSE 8501
# Run Streamlit
CMD ["streamlit", "run", "app.py", "--server.address=0.0.0.0"]
|