# Start with a base image that supports Conda FROM continuumio/miniconda3 # Set working directory WORKDIR /app # Copy your project files to the container COPY . /app # Install system dependencies RUN apt-get update && apt-get install -y build-essential # Create a new Conda environment and install OpenBabel directly RUN conda create -n ParaSurf python=3.10 openbabel -c conda-forge -y # Install pip dependencies within the Conda environment RUN conda run -n ParaSurf pip install -r requirements.txt # Set Gradio server name to bind to 0.0.0.0 for external access ENV GRADIO_SERVER_NAME="0.0.0.0" # Install DMS software WORKDIR /app/dms RUN make install # Set execute permissions for pdb2pqr RUN chmod +x /app/pdb2pqr-linux-bin64-2.1.1/pdb2pqr # Set Matplotlib config directory to a writable location ENV MPLCONFIGDIR=/tmp/matplotlib ENV XDG_CACHE_HOME=/tmp # Return to the main application directory WORKDIR /app # Expose the port for Gradio EXPOSE 7860 # Run the app directly within the Conda environment CMD ["conda", "run", "--no-capture-output", "-n", "ParaSurf", "python", "app.py"]