File size: 1,066 Bytes
78a0121
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3991f7e
6bfd1d4
78a0121
0f48a24
 
 
 
78a0121
 
 
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
# Use the full Python 3.9 image (if you need specific modules)
FROM python:3.9.19

# Working Directory
WORKDIR /app

COPY models/ /app/models/
COPY app.py .

# RUN pip install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
RUN pip install --no-cache-dir torch==2.2.2
RUN pip install --no-cache-dir packaging

# Copy Dependencies (if you have any)
COPY requirements.txt .

# Install Dependencies (if you have any)
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install -U git+https://github.com/sustcsonglin/flash-linear-attention

# Copy Custom Modules (Adjust paths if needed)
COPY causal-conv1d/ /app/causal-conv1d/
RUN cd /app/causal-conv1d && python setup.py install

COPY mamba/ /app/mamba/
RUN cd /app/mamba && python setup.py install

# Set the environment variable for the Hugging Face cache directory
ENV HF_HOME=/app/.cache

# Create the cache directory and give the appropriate permissions
RUN mkdir -p /app/.cache && chmod 777 /app/.cache

# Print Messages
# CMD ["bash"]
CMD ["python", "app.py"]