sayakpaul HF staff commited on
Commit
0b071ed
·
verified ·
1 Parent(s): 6238e05

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +53 -0
Dockerfile ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM nvidia/cuda:12.4.0-runtime-ubuntu20.04
2
+
3
+ WORKDIR /code
4
+
5
+ COPY ./requirements.txt /code/requirements.txt
6
+
7
+ LABEL maintainer="Hugging Face"
8
+ LABEL repository="diffusers"
9
+
10
+ ENV DEBIAN_FRONTEND=noninteractive
11
+
12
+ RUN apt-get -y update \
13
+ && apt-get install -y software-properties-common \
14
+ && add-apt-repository ppa:deadsnakes/ppa
15
+
16
+ RUN apt install -y bash \
17
+ build-essential \
18
+ git \
19
+ git-lfs \
20
+ curl \
21
+ ca-certificates \
22
+ libsndfile1-dev \
23
+ libgl1 \
24
+ python3.10 \
25
+ python3.10-dev \
26
+ python3-pip \
27
+ python3.10-venv && \
28
+ rm -rf /var/lib/apt/lists
29
+
30
+ RUN python3.10 -m venv /opt/venv
31
+
32
+ RUN python3.10 -m pip install --no-cache-dir --upgrade pip uv==0.1.11
33
+ RUN python3.10 -m uv pip install --no-cache-dir --upgrade -r /code/requirements.txt
34
+ RUN git clone https://github.com/KONAKONA666/q8_kernels && cd q8_kernels && git submodule init && git submodule update && python setup.py install
35
+
36
+
37
+ # Set up a new user named "user" with user ID 1000
38
+ RUN useradd -m -u 1000 user
39
+
40
+ # Switch to the "user" user
41
+ USER user
42
+
43
+ # Set home to the user's home directory
44
+ ENV HOME=/home/user \
45
+ PATH=/home/user/.local/bin:$PATH
46
+
47
+ # Set the working directory to the user's home directory
48
+ WORKDIR $HOME/app
49
+
50
+ # Copy the current directory contents into the container at $HOME/app setting the owner to the user
51
+ COPY --chown=user . $HOME/app
52
+
53
+ CMD ["python", "appy.py"]