chaowenguo commited on
Commit
dd2e8de
·
verified ·
1 Parent(s): 7e9e068

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -11
Dockerfile CHANGED
@@ -1,5 +1,4 @@
1
- # Use an official Python runtime as a parent image
2
- FROM python:3.11-slim-bullseye
3
 
4
  # Set the working directory in the container
5
  WORKDIR /MoneyPrinterTurbo
@@ -10,14 +9,11 @@ RUN chmod 777 /MoneyPrinterTurbo
10
  ENV PYTHONPATH="/MoneyPrinterTurbo"
11
 
12
  # Install system dependencies
13
- RUN apt-get update && apt-get install -y \
14
- git \
15
- imagemagick \
16
- ffmpeg \
17
- && rm -rf /var/lib/apt/lists/*
18
-
19
- # Fix security policy for ImageMagick
20
- RUN sed -i '/<policy domain="path" rights="none" pattern="@\*"/d' /etc/ImageMagick-6/policy.xml
21
 
22
  # Copy only the requirements.txt first to leverage Docker cache
23
  COPY requirements.txt ./
@@ -29,7 +25,6 @@ RUN pip install --no-cache-dir -r requirements.txt
29
  COPY . .
30
 
31
  # Expose the port the app runs on
32
- EXPOSE 8501
33
 
34
  # Command to run the application
35
  CMD ["streamlit", "run", "./webui/Main.py","--browser.serverAddress=127.0.0.1","--server.enableCORS=True","--browser.gatherUsageStats=False", "--server.port=7860"]
 
1
+ FROM ubuntu
 
2
 
3
  # Set the working directory in the container
4
  WORKDIR /MoneyPrinterTurbo
 
9
  ENV PYTHONPATH="/MoneyPrinterTurbo"
10
 
11
  # Install system dependencies
12
+ RUN <<EOF
13
+ apt update
14
+ apt install -y --no-install-recommends python3-pip git imagemagick ffmpeg
15
+ sed -i '/<policy domain="path" rights="none" pattern="@\*"/d' /etc/ImageMagick-6/policy.xml
16
+ EOF
 
 
 
17
 
18
  # Copy only the requirements.txt first to leverage Docker cache
19
  COPY requirements.txt ./
 
25
  COPY . .
26
 
27
  # Expose the port the app runs on
 
28
 
29
  # Command to run the application
30
  CMD ["streamlit", "run", "./webui/Main.py","--browser.serverAddress=127.0.0.1","--server.enableCORS=True","--browser.gatherUsageStats=False", "--server.port=7860"]