Mohammed-Altaf commited on
Commit
35598d2
1 Parent(s): 2b915b0

added new sh

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -6
Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- FROM python:3.11-slim
2
 
3
  WORKDIR /app
4
 
@@ -10,12 +10,12 @@ RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt
10
  COPY . /app
11
 
12
  # Create a script to set up the directory and environment variable
13
- RUN echo "#!/bin/bash" > setup.sh && \
14
- echo "mkdir -p /app/.cache" > setup.sh && \
15
- echo "export TRANSFORMERS_CACHE=/app/.cache" >> setup.sh && \
16
- chmod +x setup.sh
17
 
18
  EXPOSE 7860
19
 
20
  # Run the script as part of the CMD
21
- CMD ["./setup.sh", "&&", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ FROM python:3.10-slim
2
 
3
  WORKDIR /app
4
 
 
10
  COPY . /app
11
 
12
  # Create a script to set up the directory and environment variable
13
+ RUN echo "#!/bin/bash" > /app/setup.sh && \
14
+ echo "mkdir -p /app/.cache" > /app/setup.sh && \
15
+ echo "export TRANSFORMERS_CACHE=/app/.cache" >> /app/setup.sh && \
16
+ chmod +x /app/setup.sh
17
 
18
  EXPOSE 7860
19
 
20
  # Run the script as part of the CMD
21
+ CMD ["/app/setup.sh", "&&", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]