cigol123 commited on
Commit
d5cb879
·
verified ·
1 Parent(s): 3f04c85

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -31
Dockerfile CHANGED
@@ -1,38 +1,10 @@
1
- # Use an official Python runtime as a parent image
2
- FROM python:3.9-slim
3
 
4
- # Set environment variables for Hugging Face cache
5
- ENV TRANSFORMERS_CACHE=/tmp/.cache
6
- ENV HF_DATASETS_CACHE=/tmp/.cache
7
 
8
- # Set PyTorch cache directory
9
- ENV TORCH_HOME=/tmp/.cache
10
-
11
- # Create the cache directory and set permissions
12
- RUN mkdir -p /tmp/.cache && chmod -R 777 /tmp/.cache
13
-
14
- # Set the working directory in the container
15
- WORKDIR /app
16
-
17
- # Install system dependencies (required for soundfile and other libraries)
18
- RUN apt-get update && apt-get install -y \
19
- libsndfile1 \
20
- && rm -rf /var/lib/apt/lists/*
21
-
22
- # Copy the requirements file into the container
23
  COPY requirements.txt .
24
-
25
- # Upgrade pip to the latest version
26
- RUN pip install --upgrade pip
27
-
28
- # Install Python dependencies
29
  RUN pip install --no-cache-dir -r requirements.txt
30
 
31
- # Copy the current directory contents into the container
32
  COPY . .
33
 
34
- # Expose port 7860 (default port for Gradio)
35
- EXPOSE 7860
36
-
37
- # Run the app when the container launches
38
- CMD ["python", "app.py"]
 
1
+ FROM python:3.9
 
2
 
3
+ WORKDIR /code
 
 
4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  COPY requirements.txt .
 
 
 
 
 
6
  RUN pip install --no-cache-dir -r requirements.txt
7
 
 
8
  COPY . .
9
 
10
+ CMD ["python", "app.py"]