Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +15 -2
Dockerfile
CHANGED
@@ -1,11 +1,24 @@
|
|
1 |
-
# Use
|
2 |
-
FROM
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
WORKDIR /app
|
5 |
|
|
|
6 |
COPY requirements.txt .
|
7 |
RUN pip install --upgrade pip && pip install -r requirements.txt
|
8 |
|
|
|
9 |
COPY app.py .
|
10 |
|
11 |
EXPOSE 7860
|
|
|
1 |
+
# Use official CUDA base image
|
2 |
+
FROM nvidia/cuda:11.7.1-cudnn8-runtime-ubuntu20.04
|
3 |
|
4 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
5 |
+
ENV PYTHON_VERSION=3.10
|
6 |
+
|
7 |
+
# Install Python, pip, and dependencies
|
8 |
+
RUN apt-get update && apt-get install -y \
|
9 |
+
python3.10 python3.10-dev python3.10-distutils \
|
10 |
+
curl git ffmpeg libsm6 libxext6 wget build-essential \
|
11 |
+
&& ln -s /usr/bin/python3.10 /usr/bin/python \
|
12 |
+
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python
|
13 |
+
|
14 |
+
# Set working directory
|
15 |
WORKDIR /app
|
16 |
|
17 |
+
# Install Python dependencies
|
18 |
COPY requirements.txt .
|
19 |
RUN pip install --upgrade pip && pip install -r requirements.txt
|
20 |
|
21 |
+
# Copy app code
|
22 |
COPY app.py .
|
23 |
|
24 |
EXPOSE 7860
|