Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +30 -5
Dockerfile
CHANGED
@@ -1,11 +1,36 @@
|
|
1 |
-
# Use the
|
2 |
-
FROM
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
|
4 |
# Set the environment variable for the Hugging Face cache directory
|
5 |
-
ENV HF_HOME=/app/.cache
|
6 |
|
7 |
# Create the cache directory and give the appropriate permissions
|
8 |
RUN mkdir -p /app/.cache && chmod 777 /app/.cache
|
9 |
|
10 |
-
#
|
11 |
-
CMD ["
|
|
|
|
1 |
+
# Use the full Python 3.9 image (if you need specific modules)
|
2 |
+
FROM python:3.9.19
|
3 |
+
|
4 |
+
# Working Directory
|
5 |
+
WORKDIR /app
|
6 |
+
|
7 |
+
COPY models/ /app/models/
|
8 |
+
COPY app.py .
|
9 |
+
|
10 |
+
# RUN pip install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
|
11 |
+
RUN pip install --no-cache-dir torch==2.2.2
|
12 |
+
RUN pip install --no-cache-dir packaging
|
13 |
+
|
14 |
+
# Copy Dependencies (if you have any)
|
15 |
+
COPY requirements.txt .
|
16 |
+
|
17 |
+
# Install Dependencies (if you have any)
|
18 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
19 |
+
RUN pip install -U git+https://github.com/sustcsonglin/flash-linear-attention
|
20 |
+
|
21 |
+
# Copy Custom Modules (Adjust paths if needed)
|
22 |
+
COPY causal-conv1d/ /app/causal-conv1d/
|
23 |
+
RUN cd /app/causal-conv1d && python setup.py install
|
24 |
+
|
25 |
+
COPY mamba/ /app/mamba/
|
26 |
+
RUN cd /app/mamba && python setup.py install
|
27 |
|
28 |
# Set the environment variable for the Hugging Face cache directory
|
29 |
+
ENV HF_HOME=/app/.cache
|
30 |
|
31 |
# Create the cache directory and give the appropriate permissions
|
32 |
RUN mkdir -p /app/.cache && chmod 777 /app/.cache
|
33 |
|
34 |
+
# Print Messages
|
35 |
+
# CMD ["bash"]
|
36 |
+
CMD ["python", "app.py"]
|