Spaces:
Sleeping
Sleeping
Jhon Alexander Alvarez Casas
commited on
Commit
·
1e620ea
1
Parent(s):
fb0248c
update files
Browse files- Dockerfile +1 -0
- app/core/s3_config.py +0 -3
Dockerfile
CHANGED
|
@@ -3,5 +3,6 @@ WORKDIR /code
|
|
| 3 |
COPY ./requirements.txt /code/requirements.txt
|
| 4 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
| 5 |
COPY . .
|
|
|
|
| 6 |
RUN chmod -R ugo+rw /code
|
| 7 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 3 |
COPY ./requirements.txt /code/requirements.txt
|
| 4 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
| 5 |
COPY . .
|
| 6 |
+
RUN ln -snf /usr/share/zoneinfo/America/Lima /etc/localtime && echo America/Lima > /etc/timezone
|
| 7 |
RUN chmod -R ugo+rw /code
|
| 8 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
app/core/s3_config.py
CHANGED
|
@@ -8,11 +8,8 @@ from fastapi import UploadFile
|
|
| 8 |
|
| 9 |
|
| 10 |
def s3(file: UploadFile):
|
| 11 |
-
print(datetime.now())
|
| 12 |
with open(".env", 'w+b') as f:
|
| 13 |
shutil.copyfileobj(file.file, f)
|
| 14 |
-
with open(".env", 'r') as f_f:
|
| 15 |
-
print(f_f.read())
|
| 16 |
load_dotenv()
|
| 17 |
session = boto3.Session(
|
| 18 |
aws_access_key_id=os.getenv('AWS_ACCESS_KEY_ID'),
|
|
|
|
| 8 |
|
| 9 |
|
| 10 |
def s3(file: UploadFile):
|
|
|
|
| 11 |
with open(".env", 'w+b') as f:
|
| 12 |
shutil.copyfileobj(file.file, f)
|
|
|
|
|
|
|
| 13 |
load_dotenv()
|
| 14 |
session = boto3.Session(
|
| 15 |
aws_access_key_id=os.getenv('AWS_ACCESS_KEY_ID'),
|