File size: 4,278 Bytes
0c59880 eea8147 4125ecd 904f32a 0c59880 5f0c24c 0c59880 5f0c24c 0c59880 5f0c24c 0c59880 00fe36b 0c59880 5f0c24c 0c59880 5f0c24c 0c59880 5f0c24c 0c59880 eea8147 0c59880 9672c1c 0c59880 9672c1c 0c59880 eea8147 e680d0e 9672c1c |
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 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 |
# FROM python:3.9
# RUN apt update && apt install -y libgl1-mesa-glx imagemagick
# RUN pip install -U pip
# # #RUN pip install -U pyyaml
# # RUN pip install -U runway-python
# # #runway --force-reinstall
# # #RUN pip install -U tensorflow
# COPY requirements.txt .
# RUN pip install -r requirements.txt
# COPY . .
# #目前的写法是成功找到了magick文件并且python可以执行,就是magick文件没有找对
# # 修改 magick 文件的执行权限
# RUN chmod +x ./magick
# ENV IMAGEMAGICK_BINARY=./magick
# EXPOSE 7860
# #compo-singleone-v1-dev-acc.py
# CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]
#现成magick docker镜像测试
FROM ampervue/python34
# https://github.com/ampervue/docker-ffmpeg
# https://hub.docker.com/r/ampervue/ffmpeg/
MAINTAINER David Karchmer <dkarchmer@ampervue.com>
#####################################################################
#
# A Docker image with everything needed to run Python/FFMPEG scripts
#
# Image based on Ubuntu:14.04
#
# with
# - Latest Python 3.4
# - Latest FFMPEG (built)
# - ImageMagick
#
# plus a bunch of build/web essentials
#
#####################################################################
ENV NUM_CORES 4
WORKDIR /usr/local/src
RUN git clone --depth 1 https://github.com/l-smash/l-smash \
&& git clone --depth 1 git://git.videolan.org/x264.git \
&& hg clone https://bitbucket.org/multicoreware/x265 \
&& git clone --depth 1 git://source.ffmpeg.org/ffmpeg \
&& git clone --depth 1 git://github.com/mstorsjo/fdk-aac.git \
&& git clone --depth 1 https://chromium.googlesource.com/webm/libvpx \
&& git clone https://git.xiph.org/opus.git \
&& git clone --depth 1 https://github.com/mulx/aacgain.git
# Build L-SMASH
# =================================
WORKDIR /usr/local/src/l-smash
RUN ./configure \
&& make -j ${NUM_CORES} \
&& make install
# =================================
# Build libx264
# =================================
WORKDIR /usr/local/src/x264
RUN ./configure --enable-static \
&& make -j ${NUM_CORES} \
&& make install
# =================================
# Build libx265
# =================================
WORKDIR /usr/local/src/x265/build/linux
RUN cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DENABLE_SHARED:bool=off ../../source \
&& make -j ${NUM_CORES} \
&& make install
# =================================
# Build libfdk-aac
# =================================
WORKDIR /usr/local/src/fdk-aac
RUN autoreconf -fiv \
&& ./configure --disable-shared \
&& make -j ${NUM_CORES} \
&& make install
# =================================
# Build libvpx
# =================================
WORKDIR /usr/local/src/libvpx
RUN ./configure --disable-examples \
&& make -j ${NUM_CORES} \
&& make install
# =================================
# Build libopus
# =================================
WORKDIR /usr/local/src/opus
RUN ./autogen.sh \
&& ./configure --disable-shared \
&& make -j ${NUM_CORES} \
&& make install
# =================================
# Build ffmpeg.
# =================================
# NOTE: Disableling libx265 for now
# as it no longer compiles
# --enable-libx265 \
#
WORKDIR /usr/local/src/ffmpeg
RUN ./configure --extra-libs="-ldl" \
--enable-gpl \
--enable-libass \
--enable-libfdk-aac \
--enable-libfontconfig \
--enable-libfreetype \
--enable-libfribidi \
--enable-libmp3lame \
--enable-libopus \
--enable-libtheora \
--enable-libvorbis \
--enable-libvpx \
--enable-libx264 \
--enable-nonfree \
--enable-openssl \
&& make -j ${NUM_CORES} \
&& make install
# =================================
# Remove all tmpfile and cleanup
# =================================
WORKDIR /usr/local/
RUN rm -rf /usr/local/src
RUN apt-get autoremove -y; apt-get clean -y
# =================================
RUN pip install -U pip
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
EXPOSE 7860
#compo-singleone-v1-dev-acc.py
CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]
|