Im trying to dockerize my project, but ran into the following error, not sure what is the error about.
Traceback (most recent call last):
File "server/main.py", line 5, in
from fastai.vision.all import *
File "/usr/local/lib/python3.6/site-packages/fastai/vision/all.py", line 1, in from . import models
File "/usr/local/lib/python3.6/site-packages/fastai/vision/models/init.py", line 1, in from . import xresnet
File "/usr/local/lib/python3.6/site-packages/fastai/vision/models/xresnet.py", line 12, in from ...torch_basics import *
File "/usr/local/lib/python3.6/site-packages/fastai/torch_basics.py", line 9, in from .imports import *
File "/usr/local/lib/python3.6/site-packages/fastai/imports.py", line 30, in from fastcore.all import *
File "/usr/local/lib/python3.6/site-packages/fastcore/all.py", line 3, in from .dispatch import *
File "/usr/local/lib/python3.6/site-packages/fastcore/dispatch.py", line 4 from future import annotations
^
SyntaxError: future feature annotations is not defined
Im doing this on VSCode
CodePudding user response:
Managed to trouble shoot the problem and resolved it.
For python version issue
Dockerfile to change python version from 3.6 to 3.10
for the various requirement issue
update requirement.txt to latest versions as prompted by the terminal as you run the dockerize process in the terminal.
hope this helps for all future people who encounters the same problem