Update Dockerfile
Browse files- Dockerfile +7 -1
Dockerfile
CHANGED
@@ -1,9 +1,15 @@
|
|
1 |
# Use an official Python runtime as the base image
|
2 |
FROM python:3.10
|
3 |
|
|
|
|
|
|
|
4 |
# Install torch first to make it available for other packages' build processes
|
5 |
RUN pip install torch
|
6 |
|
|
|
|
|
|
|
7 |
# Copy requirements.txt and install remaining dependencies
|
8 |
COPY requirements.txt /tmp/requirements.txt
|
9 |
RUN pip install --no-cache-dir -r /tmp/requirements.txt
|
@@ -15,5 +21,5 @@ WORKDIR /app
|
|
15 |
# Expose the port (default for Gradio/Hugging Face Spaces is 7860)
|
16 |
EXPOSE 7860
|
17 |
|
18 |
-
# Command to run your application
|
19 |
CMD ["python", "app.py"]
|
|
|
1 |
# Use an official Python runtime as the base image
|
2 |
FROM python:3.10
|
3 |
|
4 |
+
# Install system dependencies (e.g., for flash-attn)
|
5 |
+
RUN apt-get update && apt-get install -y nodejs
|
6 |
+
|
7 |
# Install torch first to make it available for other packages' build processes
|
8 |
RUN pip install torch
|
9 |
|
10 |
+
# Install flash-attn with no-build-isolation
|
11 |
+
RUN pip install flash-attn --no-build-isolation
|
12 |
+
|
13 |
# Copy requirements.txt and install remaining dependencies
|
14 |
COPY requirements.txt /tmp/requirements.txt
|
15 |
RUN pip install --no-cache-dir -r /tmp/requirements.txt
|
|
|
21 |
# Expose the port (default for Gradio/Hugging Face Spaces is 7860)
|
22 |
EXPOSE 7860
|
23 |
|
24 |
+
# Command to run your application
|
25 |
CMD ["python", "app.py"]
|