sjzhao commited on
Commit
62d44a9
1 Parent(s): 9f4558e

update dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +36 -3
Dockerfile CHANGED
@@ -1,10 +1,34 @@
1
  # Use the official Python 3.11 image
2
  FROM nvidia/cuda:11.7.1-cudnn8-devel-ubuntu22.04
3
 
4
- # Set the working directory to /code
5
- WORKDIR /code
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
 
7
- RUN apt-get update && apt-get install -y git git-lfs
8
 
9
  # Copy the current directory contents into the container at /code
10
  # COPY ./requirements.txt /code/requirements.txt
@@ -25,6 +49,15 @@ ENV HOME=/home/user \
25
  # Set the working directory to the user's home directory
26
  WORKDIR $HOME/app
27
 
 
 
 
 
 
 
 
 
 
28
  # Copy the current directory contents into the container at $HOME/app setting the owner to the user
29
  COPY --chown=user . $HOME/app
30
 
 
1
  # Use the official Python 3.11 image
2
  FROM nvidia/cuda:11.7.1-cudnn8-devel-ubuntu22.04
3
 
4
+ ENV DEBIAN_FRONTEND=noninteractive
5
+
6
+ RUN apt-get update && \
7
+ apt-get upgrade -y && \
8
+ apt-get install -y --no-install-recommends \
9
+ git \
10
+ git-lfs \
11
+ wget \
12
+ curl \
13
+ # python build dependencies \
14
+ build-essential \
15
+ libssl-dev \
16
+ zlib1g-dev \
17
+ libbz2-dev \
18
+ libreadline-dev \
19
+ libsqlite3-dev \
20
+ libncursesw5-dev \
21
+ xz-utils \
22
+ tk-dev \
23
+ libxml2-dev \
24
+ libxmlsec1-dev \
25
+ libffi-dev \
26
+ liblzma-dev \
27
+ # gradio dependencies \
28
+ ffmpeg && \
29
+ apt-get clean && \
30
+ rm -rf /var/lib/apt/lists/*
31
 
 
32
 
33
  # Copy the current directory contents into the container at /code
34
  # COPY ./requirements.txt /code/requirements.txt
 
49
  # Set the working directory to the user's home directory
50
  WORKDIR $HOME/app
51
 
52
+
53
+ RUN curl https://pyenv.run | bash
54
+ ENV PATH=${HOME}/.pyenv/shims:${HOME}/.pyenv/bin:${PATH}
55
+ ARG PYTHON_VERSION=3.10.12
56
+ RUN pyenv install ${PYTHON_VERSION} && \
57
+ pyenv global ${PYTHON_VERSION} && \
58
+ pyenv rehash && \
59
+ pip install --no-cache-dir -U pip setuptools wheel
60
+
61
  # Copy the current directory contents into the container at $HOME/app setting the owner to the user
62
  COPY --chown=user . $HOME/app
63