Spaces:
Paused
Paused
Create Dockerfile
Browse files- Dockerfile +47 -0
Dockerfile
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use the NVIDIA CUDA runtime as a base image
|
2 |
+
FROM nvidia/cuda:11.3.1-cudnn8-devel-ubuntu20.04
|
3 |
+
|
4 |
+
# Set environment variables
|
5 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
6 |
+
|
7 |
+
# Install system dependencies
|
8 |
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
9 |
+
git \
|
10 |
+
cmake \
|
11 |
+
build-essential \
|
12 |
+
libgl1-mesa-glx \
|
13 |
+
libglib2.0-0 \
|
14 |
+
ffmpeg \
|
15 |
+
python3.8 \
|
16 |
+
python3-pip \
|
17 |
+
python3.8-dev \
|
18 |
+
&& rm -rf /var/lib/apt/lists/*
|
19 |
+
|
20 |
+
# Set Python 3.8 as the default python and pip versions
|
21 |
+
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.8 1
|
22 |
+
RUN update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1
|
23 |
+
|
24 |
+
# Create a working directory
|
25 |
+
WORKDIR /app
|
26 |
+
|
27 |
+
# Clone the repository (adjust the URL if needed)
|
28 |
+
RUN git clone --recursive https://github.com/jnjaby/KEEP.git .
|
29 |
+
|
30 |
+
# Install Python dependencies from requirements.txt
|
31 |
+
RUN pip install --upgrade pip
|
32 |
+
RUN pip install -r requirements.txt
|
33 |
+
|
34 |
+
# Install basicsr (assuming setup.py is in basicsr directory)
|
35 |
+
RUN python basicsr/setup.py develop
|
36 |
+
|
37 |
+
# Install additional Python packages
|
38 |
+
RUN pip install dlib ffmpeg-python
|
39 |
+
|
40 |
+
# Initialize and update Git submodules (if not handled by the clone command)
|
41 |
+
RUN git submodule init && git submodule update
|
42 |
+
|
43 |
+
# Expose any required ports (if your app uses any)
|
44 |
+
# EXPOSE 8000
|
45 |
+
|
46 |
+
# Command to run your application
|
47 |
+
CMD ["python", "app.py"]
|