randydev commited on
Commit
a4d3cf0
·
verified ·
1 Parent(s): c140056

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -16
Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- FROM python:3.10-slim
2
 
3
  WORKDIR /app
4
  WORKDIR /.cache
@@ -42,11 +42,6 @@ RUN apt -qq update && \
42
  apt-get clean && \
43
  rm -rf /var/lib/apt/lists/
44
 
45
- RUN apt-get update && \
46
- apt-get install -y curl && \
47
- curl https://sh.rustup.rs -sSf | sh -s -- -y && \
48
- export PATH="$HOME/.cargo/bin:$PATH"
49
-
50
  RUN mkdir -p /tmp/ && \
51
  cd /tmp/ && \
52
  wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \
@@ -62,19 +57,19 @@ RUN mkdir -p /tmp/ && \
62
  ENV CHROME_DRIVER /usr/bin/chromedriver
63
  ENV CHROME_BIN /usr/bin/google-chrome-stable
64
 
65
- RUN mkdir -p uploads && chmod 777 uploads
66
-
67
  COPY . .
68
  COPY requirements.txt .
69
- RUN pip3 install --no-cache-dir -r requirements.txt
70
  RUN pip3 install --upgrade pip setuptools
71
- RUN pip install --upgrade pip setuptools
 
 
 
 
72
 
73
- RUN chown -R 1000:0 .
74
- RUN chmod 777 .
75
- RUN chown -R 1000:0 /app
76
- RUN chmod 777 /app
77
- RUN chown -R 1000:0 /.cache
78
- RUN chmod 777 /.cache
79
 
80
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ FROM rendyprojects/python:latest
2
 
3
  WORKDIR /app
4
  WORKDIR /.cache
 
42
  apt-get clean && \
43
  rm -rf /var/lib/apt/lists/
44
 
 
 
 
 
 
45
  RUN mkdir -p /tmp/ && \
46
  cd /tmp/ && \
47
  wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \
 
57
  ENV CHROME_DRIVER /usr/bin/chromedriver
58
  ENV CHROME_BIN /usr/bin/google-chrome-stable
59
 
 
 
60
  COPY . .
61
  COPY requirements.txt .
 
62
  RUN pip3 install --upgrade pip setuptools
63
+ RUN pip3 install --no-cache-dir -r requirements.txt
64
+
65
+ RUN mkdir -p /app /.cache
66
+ RUN chown -R 1000:0 /app /.cache
67
+ RUN chmod -R 777 /app /.cache
68
 
69
+ RUN wget https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-amd64-static.tar.xz
70
+ RUN wget https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-amd64-static.tar.xz.md5
71
+ RUN md5sum -c ffmpeg-git-amd64-static.tar.xz.md5
72
+ RUN tar xvf ffmpeg-git-amd64-static.tar.xz
73
+ RUN mv ffmpeg-git*/ffmpeg ffmpeg-git*/ffprobe /usr/local/bin/
 
74
 
75
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]