GIGAParviz commited on
Commit
b6ffbe0
·
verified ·
1 Parent(s): 3d6b806

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -15
Dockerfile CHANGED
@@ -1,5 +1,5 @@
1
  # ---- Base Image ----
2
- FROM python:3.10
3
 
4
  # ---- Set working directory ----
5
  WORKDIR /app
@@ -7,21 +7,15 @@ WORKDIR /app
7
  # ---- Copy project files ----
8
  COPY . /app
9
 
10
- # ---- Fix CRLF line endings ----
11
- RUN find . -type f -exec sed -i 's/\r$//' {} \;
12
-
13
- # ---- Install system dependencies ----
14
- RUN apt-get update && apt-get install -y \
15
- gcc \
16
- g++ \
17
- build-essential \
18
- libatlas-base-dev \
19
- liblapack-dev \
20
- gfortran \
21
- && rm -rf /var/lib/apt/lists/*
22
 
23
  # ---- Install Python dependencies ----
24
- RUN pip install --no-cache-dir -r requirements.txt
 
25
 
26
  # ---- Environment variables ----
27
  ENV FLASK_APP=app.py
@@ -33,4 +27,4 @@ ENV PORT=7860
33
  EXPOSE 7860
34
 
35
  # ---- Run Flask app ----
36
- CMD ["bash", "app.sh"]
 
1
  # ---- Base Image ----
2
+ FROM python:3.10-bullseye
3
 
4
  # ---- Set working directory ----
5
  WORKDIR /app
 
7
  # ---- Copy project files ----
8
  COPY . /app
9
 
10
+ # ---- Fix Windows line endings ----
11
+ RUN apt-get update -y && apt-get install -y dos2unix \
12
+ && find . -type f -exec dos2unix {} \; \
13
+ && apt-get install -y gcc g++ build-essential libatlas-base-dev liblapack-dev gfortran \
14
+ && rm -rf /var/lib/apt/lists/*
 
 
 
 
 
 
 
15
 
16
  # ---- Install Python dependencies ----
17
+ RUN pip install --upgrade pip \
18
+ && pip install --no-cache-dir -r requirements.txt
19
 
20
  # ---- Environment variables ----
21
  ENV FLASK_APP=app.py
 
27
  EXPOSE 7860
28
 
29
  # ---- Run Flask app ----
30
+ CMD ["python", "app.py"]