Commit
·
a946302
1
Parent(s):
7653d41
from scratch
Browse files- Dockerfile +12 -27
Dockerfile
CHANGED
@@ -1,32 +1,17 @@
|
|
1 |
-
#
|
2 |
-
FROM
|
3 |
|
4 |
-
|
|
|
|
|
|
|
5 |
|
6 |
-
#
|
7 |
-
|
8 |
-
apt-get install -y git wget && \
|
9 |
-
apt-get clean && \
|
10 |
-
rm -rf /var/lib/apt/lists/*
|
11 |
|
12 |
-
# Copy
|
13 |
-
COPY . .
|
14 |
-
|
15 |
-
# Install required dependencies
|
16 |
-
RUN pip install --upgrade pip
|
17 |
RUN pip install --no-cache-dir -r requirements.txt
|
18 |
|
19 |
-
#
|
20 |
-
|
21 |
-
RUN chmod +x /usr/local/bin/sft
|
22 |
-
|
23 |
-
# Set full write permissions for current directory
|
24 |
-
RUN chmod -R 777 .
|
25 |
-
|
26 |
-
# Set cache environment variables to use current directory
|
27 |
-
ENV XDG_CACHE_HOME=./cache
|
28 |
-
|
29 |
-
# Start gradio application
|
30 |
-
EXPOSE 7860
|
31 |
-
ENV GRADIO_SERVER_NAME="0.0.0.0"
|
32 |
-
CMD ["python", "app.py"]
|
|
|
1 |
+
# Base image with CUDA 12.8, cuDNN 9, PyTorch 2.7.0
|
2 |
+
FROM pytorch/pytorch:2.7.0-cuda12.8-cudnn9-runtime
|
3 |
|
4 |
+
# Install system tools (optional, like git, wget)
|
5 |
+
RUN apt-get update && apt-get install -y \
|
6 |
+
git \
|
7 |
+
&& rm -rf /var/lib/apt/lists/*
|
8 |
|
9 |
+
# Set working directory
|
10 |
+
WORKDIR /app
|
|
|
|
|
|
|
11 |
|
12 |
+
# Copy and install Python dependencies
|
13 |
+
COPY requirements.txt .
|
|
|
|
|
|
|
14 |
RUN pip install --no-cache-dir -r requirements.txt
|
15 |
|
16 |
+
# Default command: open Python shell
|
17 |
+
CMD ["python"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|