Spaces:
Running
Running
File size: 926 Bytes
93867ed ef64d6b 93867ed 368bfff a7c450d ef64d6b 935b6de a7c450d ef64d6b a7c450d 93867ed a7c450d 93867ed a7c450d 93867ed 3d207f4 a7c450d 93867ed 368bfff a7c450d 93867ed 9a06845 a7c450d 93867ed |
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 38 39 |
FROM python:3.10-slim
WORKDIR /home/user/app
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
git \
libopencv-dev \
libsm6 \
libxext6 \
libxrender-dev \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
RUN pip install --no-cache-dir \
streamlit \
pillow \
numpy
# Copy the source files
COPY app.cpp /home/user/app/app.cpp
COPY app.py /home/user/app/app.py
# Compile the C++ code
RUN g++ -o /home/user/app/eigen_analysis /home/user/app/app.cpp $(pkg-config --cflags --libs opencv4) -std=c++11
# Create output directory
RUN mkdir -p /home/user/app/output && chmod 777 /home/user/app/output
# Set user permissions
RUN chmod -R 777 /home/user/app
# Expose Streamlit port
EXPOSE 7860
# Command to run the application
CMD ["streamlit", "run", "/home/user/app/app.py", "--server.port=7860", "--server.address=0.0.0.0"] |