usingcolor commited on
Commit
cf18244
·
1 Parent(s): 26ad30b

feat: initialize git repository and update project configuration and dependencies

Browse files
Files changed (3) hide show
  1. Dockerfile +42 -0
  2. README.md +1 -1
  3. requirements.txt +0 -2
Dockerfile ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM pytorch/pytorch:2.6.0-cuda12.4-cudnn9-devel
2
+
3
+ ENV DEBIAN_FRONTEND=noninteractive
4
+
5
+ # Install system dependencies
6
+ RUN apt-get update && apt-get install -y \
7
+ git ffmpeg libsm6 libxext6 cmake rsync libgl1 curl \
8
+ && rm -rf /var/lib/apt/lists/*
9
+
10
+ # Install uv for fast python package installations
11
+ RUN pip install uv
12
+
13
+ # Create non-root user required by HuggingFace Spaces
14
+ RUN useradd -m -u 1000 user
15
+ USER user
16
+ ENV HOME=/home/user \
17
+ PATH=/home/user/.local/bin:$PATH \
18
+ PYTHONWARNINGS=ignore \
19
+ GRADIO_SERVER_NAME="0.0.0.0" \
20
+ GRADIO_SERVER_PORT="7860"
21
+
22
+ WORKDIR $HOME/app
23
+
24
+ # Copy requirements and install base dependencies via uv
25
+ COPY --chown=user requirements.txt $HOME/app/
26
+ RUN uv pip install --system --upgrade pip
27
+ RUN uv pip install --system -r requirements.txt
28
+
29
+ # Specify CUDA architectures to compile for various GPUs commonly found on HF Spaces
30
+ # 7.5: T4, 8.0: A100, 8.6: A10G/RTX3090, 8.9: L4, 9.0: H100
31
+ ENV TORCH_CUDA_ARCH_LIST="7.5 8.0 8.6 8.9 9.0+PTX"
32
+
33
+ # Install causal-conv1d and mamba-ssm requiring compilation
34
+ # Since this uses the `devel` image, `nvcc` is available safely!
35
+ RUN uv pip install --system causal-conv1d==1.5.0.post8 --no-build-isolation
36
+ RUN uv pip install --system mamba-ssm==2.2.4 --no-build-isolation
37
+
38
+ # Copy the rest of the application code
39
+ COPY --chown=user . $HOME/app/
40
+
41
+ # Run the Gradio app
42
+ CMD ["python", "app.py"]
README.md CHANGED
@@ -3,7 +3,7 @@ title: MambaEye
3
  emoji: 👁️
4
  colorFrom: blue
5
  colorTo: green
6
- sdk: gradio
7
  sdk_version: 6.10.0
8
  app_file: app.py
9
  pinned: false
 
3
  emoji: 👁️
4
  colorFrom: blue
5
  colorTo: green
6
+ sdk: docker
7
  sdk_version: 6.10.0
8
  app_file: app.py
9
  pinned: false
requirements.txt CHANGED
@@ -6,5 +6,3 @@ torchvision==0.21.0
6
  lightning==2.6.1
7
  huggingface_hub
8
  omegaconf==2.3.0
9
- mamba-ssm==2.2.4
10
- causal-conv1d==1.5.0.post8
 
6
  lightning==2.6.1
7
  huggingface_hub
8
  omegaconf==2.3.0