tecuts commited on
Commit
b20aa05
·
verified ·
1 Parent(s): 0fde338

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +2 -5
Dockerfile CHANGED
@@ -1,12 +1,10 @@
1
- # Use the official Hugging Face Python base image
2
- # This image is optimized for the platform and handles secrets and hardware
3
- FROM huggingface/python-pytorch:1.13.1-cuda11.6.2-cudnn8-runtime-ubuntu20.04
4
 
5
  # Set the working directory inside the container
6
  WORKDIR /code
7
 
8
  # Copy the packages.txt file and install system dependencies (like ffmpeg)
9
- # The base image has scripts that automatically read this file
10
  COPY packages.txt packages.txt
11
  RUN apt-get update && apt-get install -y --no-install-recommends $(cat packages.txt) && \
12
  apt-get clean && rm -rf /var/lib/apt/lists/*
@@ -23,5 +21,4 @@ COPY . /code
23
  EXPOSE 7860
24
 
25
  # Command to run the application using uvicorn
26
- # Hugging Face Spaces automatically sets the PORT environment variable
27
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ # Use a standard and reliable Hugging Face Python base image
2
+ FROM huggingface/python:3.10-slim
 
3
 
4
  # Set the working directory inside the container
5
  WORKDIR /code
6
 
7
  # Copy the packages.txt file and install system dependencies (like ffmpeg)
 
8
  COPY packages.txt packages.txt
9
  RUN apt-get update && apt-get install -y --no-install-recommends $(cat packages.txt) && \
10
  apt-get clean && rm -rf /var/lib/apt/lists/*
 
21
  EXPOSE 7860
22
 
23
  # Command to run the application using uvicorn
 
24
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]