Spaces:
Runtime error
Runtime error
Silicon Valley - Admin
commited on
Commit
路
cce3030
1
Parent(s):
c46d8cf
Update Dockerfile and requirements.txt for improved dependency management and server configuration
Browse files- Upgraded pip before installing dependencies to ensure the latest version is used.
- Changed the installation of pydantic from version 2.4.2 to 1.10.13 for compatibility.
- Updated CMD in Dockerfile to use hypercorn with a configuration file for better server management.
- Dockerfile +4 -3
- requirements.txt +1 -1
Dockerfile
CHANGED
|
@@ -11,8 +11,9 @@ RUN apt-get update && apt-get install -y \
|
|
| 11 |
# Copiar solo requirements.txt primero para aprovechar la cach茅 de Docker
|
| 12 |
COPY requirements.txt .
|
| 13 |
|
| 14 |
-
# Instalar dependencias de Python
|
| 15 |
-
RUN pip install --no-cache-dir
|
|
|
|
| 16 |
|
| 17 |
# Copiar el resto de los archivos
|
| 18 |
COPY . .
|
|
@@ -26,4 +27,4 @@ ENV PORT=7860
|
|
| 26 |
EXPOSE 7860
|
| 27 |
|
| 28 |
# Comando para ejecutar la aplicaci贸n
|
| 29 |
-
CMD ["hypercorn", "
|
|
|
|
| 11 |
# Copiar solo requirements.txt primero para aprovechar la cach茅 de Docker
|
| 12 |
COPY requirements.txt .
|
| 13 |
|
| 14 |
+
# Instalar dependencias de Python con pip limpio
|
| 15 |
+
RUN pip install --no-cache-dir --upgrade pip && \
|
| 16 |
+
pip install --no-cache-dir -r requirements.txt
|
| 17 |
|
| 18 |
# Copiar el resto de los archivos
|
| 19 |
COPY . .
|
|
|
|
| 27 |
EXPOSE 7860
|
| 28 |
|
| 29 |
# Comando para ejecutar la aplicaci贸n
|
| 30 |
+
CMD ["hypercorn", "--config", "hypercorn.toml", "server:app"]
|
requirements.txt
CHANGED
|
@@ -6,5 +6,5 @@ hypercorn==0.14.3
|
|
| 6 |
websockets==11.0.3
|
| 7 |
python-json-logger==2.0.7
|
| 8 |
prometheus-client==0.17.1
|
| 9 |
-
pydantic==
|
| 10 |
python-dotenv==1.0.0
|
|
|
|
| 6 |
websockets==11.0.3
|
| 7 |
python-json-logger==2.0.7
|
| 8 |
prometheus-client==0.17.1
|
| 9 |
+
pydantic==1.10.13
|
| 10 |
python-dotenv==1.0.0
|