Spaces:
Sleeping
Sleeping
File size: 1,317 Bytes
69102c2 31d5c57 86c3fd4 31d5c57 a661232 649d25e a661232 23e645f 31d5c57 | 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 40 41 42 43 44 45 46 47 48 | # Base on Official Python 3.11 Slim
FROM python:3.11-slim
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
ENV STREAMLIT_SERVER_PORT 7860
ENV STREAMLIT_SERVER_ADDRESS 0.0.0.0
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
curl \
git \
libgl1 \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy requirements and install
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Install PyTorch CPU version
RUN pip install --no-cache-dir torch==2.7.1 torchvision==0.22.1 torchaudio==2.7.1 --index-url https://download.pytorch.org/whl/cpu
# Install PyTorch Geometric dependencies
RUN pip install --no-cache-dir pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-2.7.0+cpu.html
# Install PyTorch Geometric
RUN pip install --no-cache-dir torch_geometric
# Install spMetaTME package from GitHub
RUN pip install --no-cache-dir git+https://github.com/SurajRepo/spMetaTME.git@multi_sample
# Copy application code
COPY . .
# Expose port for Hugging Face Spaces
EXPOSE 7860
# Healthcheck
HEALTHCHECK CMD curl --fail http://localhost:7860/_stcore/health
# Run the app
CMD ["streamlit", "run", "app.py"]
|