-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile.image_server
73 lines (58 loc) · 1.79 KB
/
Dockerfile.image_server
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
FROM nvidia/cuda:11.8.0-devel-ubuntu20.04
WORKDIR /app
ENV DEBIAN_FRONTEND=noninteractive
# PM2
RUN apt-get update && apt-get install -y curl
RUN curl -sL https://deb.nodesource.com/setup_18.x | bash -
RUN apt-get install -y nodejs
RUN npm install -g pm2
# Installing necessary packages
RUN apt-get update && apt-get install -y wget git
# Installing Miniconda
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \
&& chmod 700 Miniconda3-latest-Linux-x86_64.sh \
&& ./Miniconda3-latest-Linux-x86_64.sh -b \
&& rm Miniconda3-latest-Linux-x86_64.sh
ENV PATH="/root/miniconda3/bin:${PATH}"
RUN conda create -n venv python=3.10.13 -y \
&& echo "source activate venv" > ~/.bashrc
ENV PATH="/root/miniconda3/envs/venv/bin:${PATH}"
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get -y full-upgrade \
&& apt-get -y install python3-dev \
&& apt-get install -y --no-install-recommends \
build-essential \
python3-pip\
apt-utils \
curl \
wget \
vim \
sudo \
git \
ffmpeg \
libsm6 \
libxext6 \
python3-tk \
python3-dev \
git-lfs \
unzip \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y unzip
COPY image_server/requirements.txt /app/requirements.txt
RUN pip install --upgrade pip
RUN pip install --upgrade pip setuptools
RUN pip install -r /app/requirements.txt
RUN pip install huggingface_hub[hf_transfer]
RUN rm -rf /root/.cache/pip/*
COPY image_server /app/image_server
ENV APP_HOST=0.0.0.0
ENV APP_PORT=8080
ENV HF_HUB_ENABLE_HF_TRANSFER=1
USER root
ENV VLLM_PORT=6919
ENV DEVICE=0
RUN chmod +x /app/image_server/entrypoint.sh
RUN chmod +x /app/image_server/setup.sh
CMD ["bash", "-c", "cd /app/image_server && ./setup.sh && ./entrypoint.sh"]