File size: 1,310 Bytes
0289713
 
d60424a
974fb82
 
f87c5d0
 
d9c7b42
d60424a
6ad39a0
 
f87c5d0
7ed95c2
f87c5d0
700b214
d60424a
700b214
 
 
 
2e446b4
700b214
 
 
2e446b4
 
0e2acfc
 
d60424a
f87c5d0
7ed95c2
5344d27
efe6c24
7ed95c2
f87c5d0
 
974fb82
d60424a
974fb82
f87c5d0
efe6c24
d9c7b42
0e2acfc
b157c0a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
FROM python:3.10-slim

# Set working directory
WORKDIR /app

# Install system packages
RUN apt-get update && apt-get install -y ffmpeg git wget && rm -rf /var/lib/apt/lists/*

# Set environment for proper model caching and permissions
ENV PYTHONUNBUFFERED=1
ENV HOME=/app
ENV XDG_CACHE_HOME=/app/.cache
ENV SPEECHBRAIN_CACHE=/app/.cache/speechbrain

# Create all needed directories with write permissions
RUN mkdir -p /app/pretrained_models \
    /app/wav2vec2_checkpoints \
    /app/pretrained_asr \
    /app/.cache/whisper \
    /app/.cache/speechbrain \
    /app/tmp \
    && chmod -R 777 /app/pretrained_models \
                    /app/wav2vec2_checkpoints \
                    /app/pretrained_asr \
                    /app/.cache \
                    /app/tmp

# Upgrade pip
RUN pip install --no-cache-dir --upgrade pip --root-user-action=ignore

# Copy source
COPY . .

# Download Hugging Face interface file
RUN mkdir -p src && wget -O src/custome_interface.py https://huggingface.co/Jzuluaga/accent-id-commonaccent_xlsr-en-english/resolve/main/custom_interface.py

# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt --root-user-action=ignore

# Expose Streamlit port
EXPOSE 8501

# Run Streamlit app
CMD ["streamlit", "run", "streamlit_app.py", "--server.port=8501"]