utkarsh134 commited on
Commit
38e9c8e
·
verified ·
1 Parent(s): e770896

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -15
Dockerfile CHANGED
@@ -1,29 +1,20 @@
1
- FROM python:3.11-slim
2
-
3
- RUN groupadd -g 1000 app && \
4
- useradd -u 1000 -g app -ms /bin/bash app
5
 
6
  WORKDIR /app
7
 
8
  RUN apt-get update && apt-get install -y --no-install-recommends \
9
- gcc \
10
  build-essential \
 
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
  COPY requirements.txt .
14
- COPY . .
15
-
16
  RUN pip install --no-cache-dir -r requirements.txt
17
 
18
- RUN mkdir -p /app/tmp/logo_generator && \
19
- chown -R app:app /app/tmp && \
20
- chmod -R 777 /app/tmp
21
 
22
- ENV USE_IN_MEMORY_STORAGE=True
23
- ENV PYTHONUNBUFFERED=1
24
 
25
  EXPOSE 7860
26
 
27
- USER app
28
-
29
- CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ FROM python:3.10-slim
 
 
 
2
 
3
  WORKDIR /app
4
 
5
  RUN apt-get update && apt-get install -y --no-install-recommends \
 
6
  build-essential \
7
+ && apt-get clean \
8
  && rm -rf /var/lib/apt/lists/*
9
 
10
  COPY requirements.txt .
 
 
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
+ COPY . .
 
 
14
 
15
+ ENV HOST=0.0.0.0
16
+ ENV PORT=7860
17
 
18
  EXPOSE 7860
19
 
20
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]