Spaces:
Running
on
Zero
Running
on
Zero
chong.zhang
commited on
Commit
·
1edd5ed
1
Parent(s):
3460b5c
update
Browse files- Dockerfile +24 -0
- space.yaml +1 -0
Dockerfile
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use a Python 3.8.20 base image
|
2 |
+
FROM python:3.8.20-slim
|
3 |
+
|
4 |
+
# Set working directory in container
|
5 |
+
WORKDIR /app
|
6 |
+
|
7 |
+
# Install system dependencies (if needed)
|
8 |
+
RUN apt-get update && apt-get install -y \
|
9 |
+
build-essential \
|
10 |
+
python3-dev \
|
11 |
+
&& rm -rf /var/lib/apt/lists/*
|
12 |
+
|
13 |
+
# Copy requirements.txt into the container
|
14 |
+
COPY requirements.txt .
|
15 |
+
|
16 |
+
# Install the Python dependencies
|
17 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
18 |
+
RUN pip install flash-attn --no-build-isolation
|
19 |
+
|
20 |
+
# Copy the rest of the application files into the container
|
21 |
+
COPY . .
|
22 |
+
|
23 |
+
# Command to run Gradio interface (you can replace 'app.py' with your actual entry point)
|
24 |
+
CMD ["python", "app.py"]
|
space.yaml
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
python==3.8.20
|