Spaces:
Runtime error
Runtime error
Create Dockerfile
Browse files- Dockerfile +23 -0
Dockerfile
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM nvidia/cuda:11.8.0-runtime-ubuntu22.04
|
2 |
+
|
3 |
+
# Install Python and pip
|
4 |
+
RUN apt-get update && apt-get install -y \
|
5 |
+
python3 \
|
6 |
+
python3-pip \
|
7 |
+
&& rm -rf /var/lib/apt/lists/*
|
8 |
+
|
9 |
+
WORKDIR /app
|
10 |
+
|
11 |
+
# Install PyTorch and other dependencies
|
12 |
+
RUN pip3 install --upgrade pip
|
13 |
+
RUN pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
|
14 |
+
RUN pip3 install runpod transformers peft accelerate bitsandbytes gradio
|
15 |
+
|
16 |
+
# Copy your handler
|
17 |
+
COPY handler.py .
|
18 |
+
|
19 |
+
# Expose port for Gradio (if needed)
|
20 |
+
EXPOSE 7860
|
21 |
+
|
22 |
+
# Run handler
|
23 |
+
CMD [ "python3", "-u", "handler.py" ]
|