jjhoffstein commited on
Commit
80dfc42
·
verified ·
1 Parent(s): 6807a04

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -2
Dockerfile CHANGED
@@ -1,6 +1,8 @@
1
  FROM python:3.11-slim
2
  WORKDIR /app
3
  COPY requirements.txt .
4
- RUN pip install --no-cache-dir -r requirements.txt
 
 
5
  COPY file.py .
6
- CMD ["python", "file.py"]
 
1
  FROM python:3.11-slim
2
  WORKDIR /app
3
  COPY requirements.txt .
4
+ # Upgrade pip and then install, specifying the index URL to bypass potential DNS/mirror issues.
5
+ RUN pip install --upgrade pip && \
6
+ pip install --no-cache-dir --index-url https://pypi.org/simple/ -r requirements.txt
7
  COPY file.py .
8
+ CMD ["python", "file.py"]